Commit 12056ef
committed
refactor: migrate login_linux_test.go to nerdtest.Setup
Replace testutil.NewBase-based test helpers with the Tigron test
framework (nerdtest.Setup). Key changes:
- Client.Run(base, host) replaced with Client.Cmd(helpers, host)
returning test.TestableCommand; DOCKER_CONFIG set via Setenv.
- testregistry.NewRegistry / testca.New replaced with
nerdtest.RegistryWithBasicAuth, nerdtest.RegistryWithTokenAuth, and
lower-level registry.NewCesantaAuthServer + registry.NewDockerRegistry
for the token-auth/no-TLS case (HTTP registry, matching original
behaviour).
- TestLoginPersistence: two SubTests (basic, token) each owning their
registry lifecycle via Setup/Cleanup.
- TestLoginAgainstVariants: dynamically generated SubTests from the
existing test-case table; inner regHost and assertion loops run
sequentially inside Setup (equivalent coverage without nested t.Run).
- testutil.DockerIncompatible replaced with require.Not(nerdtest.Docker).
- TestAgainstNoAuth remains commented out, unchanged.
Closes #4613
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>1 parent ad4795a commit 12056ef
1 file changed
Lines changed: 246 additions & 314 deletions
0 commit comments