Skip to content

Commit

Permalink
Backport of fingerprint: update landlock test to accept v4+ APIs into…
Browse files Browse the repository at this point in the history
… release/1.8.x (#23981)

Co-authored-by: Tim Gross <tgross@hashicorp.com>
  • Loading branch information
hc-github-team-nomad-core and tgross authored Sep 17, 2024
1 parent 48c1489 commit b308d67
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/fingerprint/landlock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package fingerprint

import (
"errors"
"fmt"
"testing"

"github.com/hashicorp/nomad/ci"
Expand All @@ -29,13 +30,12 @@ func TestLandlockFingerprint(t *testing.T) {
must.NoError(t, err)

result := response.Attributes[landlockKey]
exp := map[int]string{
0: "", // unavailable
1: "v1",
2: "v2",
3: "v3",
switch version {
case 0:
must.Eq(t, "", result)
default:
must.Eq(t, fmt.Sprintf("v%d", version), result)
}
must.Eq(t, exp[version], result)
}

func TestLandlockFingerprint_absent(t *testing.T) {
Expand Down

0 comments on commit b308d67

Please sign in to comment.