(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestService_ProcessSnapshotVSA(t *testing.T) { |
| 178 | ctx := context.Background() |
| 179 | fs := afero.NewMemMapFs() |
| 180 | |
| 181 | // Create test data |
| 182 | report := applicationsnapshot.Report{ |
| 183 | Success: true, |
| 184 | Policy: ecc.EnterpriseContractPolicySpec{}, |
| 185 | Components: []applicationsnapshot.Component{ |
| 186 | { |
| 187 | SnapshotComponent: app.SnapshotComponent{ |
| 188 | Name: "test-component", |
| 189 | ContainerImage: "quay.io/test/image:tag", |
| 190 | }, |
| 191 | Success: true, |
| 192 | }, |
| 193 | }, |
| 194 | } |
| 195 | |
| 196 | // Create test signer |
| 197 | signer := testSigner("/test.key", fs) |
| 198 | service := NewServiceWithFS(signer, fs, "https://github.com/test/policy", nil, "vsa-") |
| 199 | |
| 200 | // Test successful processing |
| 201 | envelopePath, err := service.ProcessSnapshotVSA(ctx, report) |
| 202 | |
| 203 | assert.NoError(t, err) |
| 204 | assert.NotEmpty(t, envelopePath) |
| 205 | assert.Contains(t, envelopePath, ".intoto.jsonl") |
| 206 | } |
| 207 | |
| 208 | func TestService_ProcessAllVSAs(t *testing.T) { |
| 209 | ctx := context.Background() |
nothing calls this directly
no test coverage detected