Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

566 B
Raw Blame
package sts

import "testing"

func TestIsClaimBasedPolicyRoleArn(t *testing.T) {
	cases := []struct {
		name string
		arn  string
		want bool
	}{
		{"empty matches", "", true},
		{"sentinel matches", ClaimBasedPolicyRoleArn, true},
		{"concrete role does not", "arn:aws:iam::123:role/admin", false},
		{"random ARN does not", "arn:aws:sts::123:assumed-role/X/Y", false},
	}
	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			if got := IsClaimBasedPolicyRoleArn(tc.arn); got != tc.want {
				t.Fatalf("got=%v want=%v", got, tc.want)
			}
		})
	}
}