Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

[WIP] [18.06] Fix CLI external-ca tests in swarm suite #23

Closed
wants to merge 1 commit into from
Closed

[WIP] [18.06] Fix CLI external-ca tests in swarm suite #23

wants to merge 1 commit into from

Conversation

cyli
Copy link

@cyli cyli commented Jul 12, 2018

docker/cli#1178 changed the CLI behavior so that
the external CA correctly propagates the CA certificate along with the
external CA URL. Update the tests to reflect that.

Signed-off-by: cyli cyli@twistedmatrix.com
(cherry picked from commit c238517)

This is a back port of moby#37442

cc @andrewhsu

the external CA correctly propagates the CA certificate along with the
external CA URL.  Update the tests to reflect that.

Signed-off-by: cyli <cyli@twistedmatrix.com>
(cherry picked from commit c238517)
@andrewhsu
Copy link

Hmm...I see error from the tests:

FAIL: docker_cli_swarm_test.go:84: DockerSwarmSuite.TestSwarmInit

[dc2cf882ec14f] waiting for daemon to start
[dc2cf882ec14f] daemon started

docker_cli_swarm_test.go:117:
    c.Assert(spec.CAConfig.ExternalCAs[0].CACert, checker.Equals, sw.TLSInfo.TrustRoot)
... obtained string = ""
... expected string = "" +
...     "-----BEGIN CERTIFICATE-----\n" +
...     "MIIBajCCARCgAwIBAgIUGb8Na0HBWGOw/+hQjH20AHC8NgcwCgYIKoZIzj0EAwIw\n" +
...     "EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTgwNzEyMjAyNzAwWhcNMzgwNzA3MjAy\n" +
...     "NzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\n" +
...     "A0IABCabZGYtkV1zAyl5YHTVyTeJK4JdfzsqcdbtVwFDOe0FqN7MgHmlHmRp/IsJ\n" +
...     "c5NK6qhLbnA5Hr9iitR9ZkLPq4CjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\n" +
...     "Af8EBTADAQH/MB0GA1UdDgQWBBQP1e1uGZtUgVkLI/M8YT9F9+r3MTAKBggqhkjO\n" +
...     "PQQDAgNIADBFAiEAmXYYvy2YlHekfgt7Lo3U0xl9DAkH7Yan9zYY6mL+Y8YCIAtS\n" +
...     "z7A7p9IgHrXNmD3WnlqkF8hfDpSbI2afgem/Ddtm\n" +
...     "-----END CERTIFICATE-----\n"
FAIL: docker_cli_swarm_test.go:35: DockerSwarmSuite.TestSwarmUpdate

[d063c33440700] waiting for daemon to start
[d063c33440700] daemon started

docker_cli_swarm_test.go:68:
    c.Assert(spec.CAConfig.ExternalCAs[0].CACert, checker.Equals, sw.TLSInfo.TrustRoot)
... obtained string = ""
... expected string = "" +
...     "-----BEGIN CERTIFICATE-----\n" +
...     "MIIBajCCARCgAwIBAgIUTdl63bOeoO1viOSyQFYK8HkV7JcwCgYIKoZIzj0EAwIw\n" +
...     "EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTgwNzEyMjAzNDAwWhcNMzgwNzA3MjAz\n" +
...     "NDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\n" +
...     "A0IABFooNPkxaV7MawuE2m8gDgpOhzznZvu2p2EO8sLxSgaomdzm2JiIbnFcHlx/\n" +
...     "x7Z+RCn4zNvctD6bSvn202epWRijQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\n" +
...     "Af8EBTADAQH/MB0GA1UdDgQWBBRZ1fkERZCE68mp3+xvwW3BoIJuETAKBggqhkjO\n" +
...     "PQQDAgNIADBFAiEA5hRD8I8DlbofWFAHpobtTYe5lKwDRVmV66FMLoaa17UCIBKP\n" +
...     "Itipqrlkcpjw/ICccqW0aGrsKTbEzKl3mlYnuFaz\n" +
...     "-----END CERTIFICATE-----\n"

@andrewhsu andrewhsu requested a review from anshulpundir July 12, 2018 20:53
@cyli
Copy link
Author

cyli commented Jul 12, 2018

This is because engine is specifying testing against 17.06-ce CLI, which did not have this behavior change, and there is currently no 18.06-ce CLI yet. :|. I believe, as per @thaJeztah, we have to move the tests elsewhere or re-write them to just use the API.

@thaJeztah thaJeztah changed the title [18.06] Fix CLI external-ca tests in swarm suite [WIP] [18.06] Fix CLI external-ca tests in swarm suite Jul 13, 2018
@thaJeztah thaJeztah modified the milestones: 18.06.0, 18.06.1 Jul 13, 2018
@thaJeztah thaJeztah modified the milestones: 18.06.1, 18.06.2 Sep 10, 2018
@thaJeztah thaJeztah modified the milestones: 18.06.2, 18.06.3 Feb 11, 2019
@kolyshkin kolyshkin closed this Jun 19, 2019
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.

4 participants