summaryrefslogtreecommitdiff
path: root/integration-cli/docker_cli_logout_test.go
Commit message (Collapse)AuthorAgeFilesLines
* test: use `T.Setenv` to set env vars in testsEng Zer Jun2022-04-231-10/+6
| | | | | | | | | This commit replaces `os.Setenv` with `t.Setenv` in tests. The environment variable is automatically restored to its original value when the test and all its subtests complete. Reference: https://pkg.go.dev/testing#T.Setenv Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-271-9/+8
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* bump gotest.tools v3.0.1 for compatibility with Go 1.14Sebastiaan van Stijn2020-02-111-1/+1
| | | | | | full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* rm-gocheck: run goimports to compile successfullyTibor Vass2019-09-091-1/+1
| | | | | | | | | | goimports -w \ -- "./integration-cli/daemon" "./pkg/discovery" "./pkg/discovery/file" "./pkg/discovery/kv" "./pkg/discovery/memory" "./pkg/discovery/nodes" "./integration-cli" \ && \ gofmt -w -s \ -- "./integration-cli/daemon" "./pkg/discovery" "./pkg/discovery/file" "./pkg/discovery/kv" "./pkg/discovery/memory" "./pkg/discovery/nodes" "./integration-cli" Signed-off-by: Tibor Vass <tibor@docker.com>
* rm-gocheck: check.C -> testing.TTibor Vass2019-09-091-2/+2
| | | | | | | sed -E -i 's#\bcheck\.C\b#testing.T#g' \ -- "integration-cli/check_test.go" "integration-cli/daemon/daemon.go" "integration-cli/daemon/daemon_swarm.go" "integration-cli/daemon_swarm_hack_test.go" "integration-cli/docker_api_attach_test.go" "integration-cli/docker_api_build_test.go" "integration-cli/docker_api_build_windows_test.go" "integration-cli/docker_api_containers_test.go" "integration-cli/docker_api_containers_windows_test.go" "integration-cli/docker_api_exec_resize_test.go" "integration-cli/docker_api_exec_test.go" "integration-cli/docker_api_images_test.go" "integration-cli/docker_api_inspect_test.go" "integration-cli/docker_api_logs_test.go" "integration-cli/docker_api_network_test.go" "integration-cli/docker_api_stats_test.go" "integration-cli/docker_api_swarm_node_test.go" "integration-cli/docker_api_swarm_service_test.go" "integration-cli/docker_api_swarm_test.go" "integration-cli/docker_api_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_attach_unix_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_commit_test.go" "integration-cli/docker_cli_cp_from_container_test.go" "integration-cli/docker_cli_cp_test.go" "integration-cli/docker_cli_cp_to_container_test.go" "integration-cli/docker_cli_cp_to_container_unix_test.go" "integration-cli/docker_cli_cp_utils_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_plugins_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_events_test.go" "integration-cli/docker_cli_events_unix_test.go" "integration-cli/docker_cli_exec_test.go" "integration-cli/docker_cli_exec_unix_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_history_test.go" "integration-cli/docker_cli_images_test.go" "integration-cli/docker_cli_import_test.go" "integration-cli/docker_cli_info_test.go" "integration-cli/docker_cli_info_unix_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_links_test.go" "integration-cli/docker_cli_login_test.go" "integration-cli/docker_cli_logout_test.go" "integration-cli/docker_cli_logs_test.go" "integration-cli/docker_cli_netmode_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_logdriver_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_proxy_test.go" "integration-cli/docker_cli_prune_unix_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_pull_local_test.go" "integration-cli/docker_cli_pull_test.go" "integration-cli/docker_cli_push_test.go" "integration-cli/docker_cli_registry_user_agent_test.go" "integration-cli/docker_cli_restart_test.go" "integration-cli/docker_cli_rmi_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_save_load_unix_test.go" "integration-cli/docker_cli_search_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_service_health_test.go" "integration-cli/docker_cli_service_logs_test.go" "integration-cli/docker_cli_service_scale_test.go" "integration-cli/docker_cli_sni_test.go" "integration-cli/docker_cli_start_test.go" "integration-cli/docker_cli_stats_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_swarm_unix_test.go" "integration-cli/docker_cli_top_test.go" "integration-cli/docker_cli_update_unix_test.go" "integration-cli/docker_cli_userns_test.go" "integration-cli/docker_cli_v2_only_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_deprecated_api_v124_test.go" "integration-cli/docker_deprecated_api_v124_unix_test.go" "integration-cli/docker_hub_pull_suite_test.go" "integration-cli/docker_utils_test.go" "integration-cli/events_utils_test.go" "integration-cli/fixtures_linux_daemon_test.go" "integration-cli/utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" "pkg/discovery/nodes/nodes_test.go" Signed-off-by: Tibor Vass <tibor@docker.com>
* Replace some checkers and assertions with gotest.toolsSebastiaan van Stijn2019-04-051-27/+28
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration: use %s for check.Commentf()Kir Kolyshkin2018-08-141-1/+1
| | | | | | | | | | | | | | It is wrong to pass an arbitrary string to a function expecting %-style formatting. One solution would be to replace any % with %%, but it's easier to just do what this patch does. Generated with: for f in $(git grep -l 'check.Commentf(out)'); do \ sed -i -e 's/check\.Commentf(out)/check.Commentf("%s", out)/g' $f; \ done Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Disallow using legacy (V1) registriesSebastiaan van Stijn2017-12-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | Interacting with v1 registries was deprecated in Docker 1.8.3, disabled by default in Docker 17.06, and scheduled for removal in Docker 17.12. This patch disallows enabling V1 registry through the `--disable-legacy-registry` option, and the `"disable-legacy-registry": false` option in the daemon configuration file. The actual V1 registry code is still in place, and will be removed separately. With this patch applied: $ dockerd --disable-legacy-registry=false ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported Or, when setting through the `daemon.json` configuration file $ mkdir -p /etc/docker/ $ echo '{"disable-legacy-registry":false}' > /etc/docker/daemon.json $ dockerd ERROR: The 'disable-legacy-registry' configuration option has been removed. Interacting with legacy (v1) registries is no longer supported Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Disable legacy (v1) registries by defaultSebastiaan van Stijn2017-06-121-6/+14
| | | | | | | | | | | | | | | Deprecation of interacting with v1 registries was started in docker 1.8.3, which added a `--disable-legacy-registry` flag. This option was anounced to be the default starting with docker 17.06, and v1 registries completely removed in docker 17.12. This patch updates the default, and disables interaction with v1 registres by default. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Merge pull request #29799 from vdemeester/integration-registry-packageSebastiaan van Stijn2017-01-021-3/+3
|\ | | | | [test-integration] Add a registry package with registry v1/v2 code
| * Add a registry package with registry v1/v2 codeVincent Demeester2017-01-021-3/+3
| | | | | | | | | | | | | | | | This extract what was in registry_test.go and registry_mock_test.go. This also move `RegistryHosting` requirement to `registry.Hosting` Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* | Remove pkg/integration and move it to testutil or integration-cliVincent Demeester2016-12-301-1/+1
|/ | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* support legacy registries in exernal storesAntonio Murdaca2016-09-071-0/+44
| | | | Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* Change v1 pull 404 message to include tagAaron Lehmann2016-03-291-1/+1
| | | | | | | | | | | | | The current error message is "Error: image [name] not found". This makes sense from the perspective of the v1 pull, since we found the repository doesn't exist over the v1 protocol. However, in the vast majority of cases, this error will be produced by fallback situations, where we first try to pull the tag with the v2 protocol, and then fall back the v1 protocol, which probably isn't even supported by the server. Including the tag in the error message makes a lot more sense since the actual repository may exist on v2, but not the tag. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* distribution: errors: do not access the errors slice if it's emptyAntonio Murdaca2016-03-161-1/+1
| | | | | | | | - cherry-pick from 1.10.3 branch: 0186f4d4223a094a050d06f456355da3ae431468 - add token service test suite - add integration test (missing in 1.10.3 branch) Signed-off-by: Antonio Murdaca <runcom@redhat.com>
* api: client: fix login/logout with creds storeAntonio Murdaca2016-03-021-0/+56
Make sure credentials are removed from the store at logout (not only in the config file). Remove not needed error check and auth erasing at login (auths aren't stored anywhere at that point). Add regression test. Signed-off-by: Antonio Murdaca <runcom@redhat.com>