Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Changes to enable ST tests of golang calicoctl #163

Merged
merged 25 commits into from
Nov 4, 2016

Conversation

lwr20
Copy link
Member

@lwr20 lwr20 commented Oct 14, 2016

Needed for tests in projectcalico/calicoctl#1252 to work.

@tomdee
Copy link
Contributor

tomdee commented Oct 25, 2016

I think it's better to use uncompressed container images (I think I saw that you'd changed some to use .tgz)

@lwr20
Copy link
Member Author

lwr20 commented Oct 26, 2016

I (and @fasaxc ) thought that compressed was better because of the problems we'd had recently with semaphore or circle running out of disk space. I don't feel strongly either way though.

What's your reason for uncompressed being better?

pformat(DeepDiff(thing1, thing2), indent=2)

@staticmethod
def writeyaml(filename, data):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick doc string here and below would be super

def __init__(self, name, start_calico=True, dind=True,
additional_docker_options="",
post_docker_commands=["docker load -i /code/calico-node.tar",
"docker load -i /code/busybox.tar"],
post_docker_commands=["docker load -i /code/calico-node.tgz",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to understand Toms objection here. Could we actually allow both?

def wrapped(*args, **kwargs):
try:
return fn(*args, **kwargs)
except KeyboardInterrupt:
raise
except Exception as e:
if (os.getenv("DEBUG_FAILURES") != None and
os.getenv("DEBUG_FAILURES").lower() == "true"):
if (os.getenv("DEBUG_FAILURES") is not None and os.getenv(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this splitting is actually harder to read

@@ -93,7 +95,11 @@ def _get_ping_function(self, ip):
"-c", "1", # Number of pings
"-W", "1", # Timeout for each ping
ip,
]
# "hping",
Copy link
Contributor

@robbrockbank robbrockbank Nov 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this here for? Shouldn't have commented out code checked into master

"""
# test_string = "hello"
args = [
# "echo", test_string, "|", # send data to responder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again - shouldn't have this in the checked-in code

logger.error("TEST FAILED:\n%s\nEntering DEBUG mode."
% e.message)
pdb.set_trace()
else:
raise e

return wrapped


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_bird_status()

This needs updating to run calicoctl node status rather than calicoctl status

Do we have any tests for that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet - you only added that last night ;)

@robbrockbank
Copy link
Contributor

For the mass merge to master I think we want to remove the "go/python" calicoctl option - just assume it's go.

@robbrockbank robbrockbank removed their assignment Nov 4, 2016
@lwr20
Copy link
Member Author

lwr20 commented Nov 4, 2016

Switched back to uncompressed images.

@lwr20 lwr20 changed the title [WIP] Changes to enable ST tests of golang calicoctl Changes to enable ST tests of golang calicoctl Nov 4, 2016
:param data: string, the data to put inthe file
:return: Return code of execute operation.
"""
return self.execute("cat << EOF > %s\n%s" % (filename, data))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need another EOF at the end of this string to terminate, yeah?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird, but it seems to work. Maybe docker adds the EOF or something. Since we're rushed I think it's fine as is.

@matthewdupre matthewdupre merged commit ef56867 into projectcalico:master Nov 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants