Skip to content

Starting E2E tests#24

Merged
Gerrit91 merged 34 commits intomainfrom
new-tests
Mar 20, 2026
Merged

Starting E2E tests#24
Gerrit91 merged 34 commits intomainfrom
new-tests

Conversation

@Gerrit91
Copy link
Contributor

@Gerrit91 Gerrit91 commented Mar 19, 2026

Description

Let's introduce some E2E tests again.

Used AI-Tools ✨

  • Claude Opus 4.6

Gerrit91 and others added 10 commits March 18, 2026 14:33
… image

- Enhance test framework with proto yaml/json validators using WantObject field
- Clean up commented-out dead code in common_test.go and ip_test.go
- Enable IP list test (Test_IPCmd_MultiResult)
- Add IP describe yaml/json coverage via WantObject
- Add project describe + list tests with all 6 output formats
- Add tenant describe test with yaml, json, template formats
- Add token describe test with yaml, json, template formats
- Add image list test with table, wide, template, markdown formats

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cmd/api/v2/ip.go Outdated

resp, err := c.c.Client.Apiv2().IP().Create(ctx, rq)
if err != nil {
if connectErr, ok := errors.AsType[*connect.Error](err); ok && connectErr.Code() == connect.CodeAlreadyExists {
Copy link
Contributor

Choose a reason for hiding this comment

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

should always be a connect.Error

Copy link
Contributor

Choose a reason for hiding this comment

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

Or we introduce errorutils here as well

Gerrit91 and others added 17 commits March 19, 2026 13:30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Project's Convert() doesn't make API calls (unlike IP which calls Get
inside IpResponseToUpdate), so from-file operations go directly to the
target operation without a preceding Get call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Gerrit91 Gerrit91 marked this pull request as ready for review March 19, 2026 14:43
@Gerrit91
Copy link
Contributor Author

This should be quite a good start to work with now.

@Gerrit91 Gerrit91 merged commit f9c86f0 into main Mar 20, 2026
5 checks passed
@Gerrit91 Gerrit91 deleted the new-tests branch March 20, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants