-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Network Fixtures and Run Tests with Kitchen-Terraform #33
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try to limit the use of attributes to values which are necessary to obtain subjects. Relying on an attribute to provide the expected value of an expectations may indicate that the expectation is simply validating that the Terraform resources applied correctly rather than verifying broader intent of the configuration.
We should try to limit expectations to 1 per example in order to provide clarity if expectations fail.
Using the includes
and including
matchers could help to simplify the examples which rely on filtered values.
let(:taints) { nodes.first.spec.taints.map(&:to_h) }
# ...
expect(taints).to include(
including(
effect: "PreferNoSchedule",
key: "all-pools-example",
value: "true"
),
# ...
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have verified that the tests pass. stub_domains
requires 2 converges to correctly configure module.gke.google_container_cluster.primary
.
@Jberlinsky Here are follow-up items:
|
@morgante I haven't seen the |
@morgante I've addressed the action items you listed above, based on our conversation on Thursday:
Could you take another look at this when you get a moment? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small changes and clarifications requested.
@aaron-lane I've addressed your comments -- would appreciate a re-review! |
2bbf53a
to
12350cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is in much better shape than before. Still a few small warts.
@@ -39,7 +39,9 @@ mkdir "${TMPDIR}" | |||
|
|||
export KUBECONFIG="${TMPDIR}/config" | |||
|
|||
echo "${CA_CERTIFICATE}" | base64 --decode > "${TMPDIR}/ca_certificate" | |||
# shellcheck disable=SC1117 | |||
base64 --help | grep "\--decode" && B64_ARG="--decode" || B64_ARG="-d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems very complex? Why do we need to do all this greping?
Anyways. This is not a testing change = separate PR please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This identifies which flag is used to "decode"; the interface of base64
differs across platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd argue that this is indeed a testing change -- in moving from running these tests on the local host (the current state of master
) to docker
, it was necessary to change the interface of base64
as Aaron mentioned above depending on where the test is being run.
This is very close to being ready, here's my proposed plan of attack. Blocking issues (cannot merge until fixed):
We can merge but I want us to immediately back out any functional changes into their own PRs. Items to address soon after: |
Running
This is possibly an upstream issue. |
f6ca3a7
to
41a068d
Compare
@morgante At a quick glance, the permadiff does indeed look to be upstream. I'm digging into it now. |
It does indeed look like the permadiff is upstream -- all the way up to
The good news is that as of 15 days ago, it's claimed to be fixed in |
This fixes the following build issue: ``` ERROR: unsatisfiable constraints: go-1.10.5-r0: breaks: world[go=1.10.1-r0] ```
This fixes the following build issue: ``` ERROR: unsatisfiable constraints: curl-7.61.1-r1: breaks: world[curl=7.61.1-r0] git-2.18.1-r0: breaks: world[git=2.18.0-r0] ```
This fixes the following build issue: ``` ERROR: unsatisfiable constraints: ca-certificates-20171114-r3: breaks: world[ca-certificates=20161130-r0] satisfies: curl-7.61.1-r1[ca-certificates] libcurl-7.61.1-r1[ca-certificates] .ruby-rundeps-0[ca-certificates] bash-4.4.19-r1: breaks: world[bash=4.3.42-r5] curl-7.61.1-r1: breaks: world[curl=7.60.0-r1] musl-dev-1.1.19-r10: breaks: world[musl-dev=1.1.14-r16] satisfies: libc-dev-0.7.1-r0[musl-dev] g++-6.4.0-r9: breaks: world[g++=5.3.0-r0] git-2.18.1-r0: breaks: world[git=2.8.6-r0] jq-1.6_rc1-r1: breaks: world[jq=1.5-r2] make-4.2.1-r2: breaks: world[make=4.1-r1] python2-2.7.15-r1: breaks: world[python=2.7.14-r0] satisfies: python2-dev-2.7.15-r1[python2=2.7.15-r1] py-setuptools-39.1.0-r0[python2] py2-pip-10.0.1-r0[python2] py2-pip-10.0.1-r0: breaks: world[py-pip=8.1.2-r0] python2-dev-2.7.15-r1: breaks: world[python-dev=2.7.14-r0] ```
… to be passed to cluster node pool creation
…g Terraform runs or destroying resources
b16c1d3
to
4a32e01
Compare
…modules/feature/automatic-fixture-network-creation Build Network Fixtures and Run Tests with Kitchen-Terraform
Continuation of #20, incorporating #20 (comment).
Addresses #28 and #25 along the way.