Add marketplace foundation and cross-domain tenant auth
This commit is contained in:
30
connectorkit/manifest_test.go
Normal file
30
connectorkit/manifest_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package connectorkit
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestValidateFirstPartyManifests(t *testing.T) {
|
||||
for _, rel := range []string{
|
||||
"../../../connectors/github/attesto.connector.json",
|
||||
"../../../connectors/gitlab/attesto.connector.json",
|
||||
"../../../connectors/s3/attesto.connector.json",
|
||||
} {
|
||||
path := filepath.Clean(rel)
|
||||
raw, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatalf("read manifest %s: %v", rel, err)
|
||||
}
|
||||
var manifest Manifest
|
||||
if err := json.Unmarshal(raw, &manifest); err != nil {
|
||||
t.Fatalf("parse manifest %s: %v", rel, err)
|
||||
}
|
||||
result := ValidateManifest(manifest)
|
||||
if !result.OK || result.EvidenceScore != 95 || result.Tier != "platinum" {
|
||||
t.Fatalf("unexpected validation result for %s: %+v", rel, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user