Skip to content

Commit

Permalink
Fix provider-metadata.json
Browse files Browse the repository at this point in the history
  • Loading branch information
koplas committed Sep 16, 2024
1 parent 714735d commit 989e366
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions cmd/csaf_downloader/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
)

type ProviderParams struct {
url string
enableSha256 bool
enableSha512 bool
URL string
EnableSha256 bool
EnableSha512 bool
}

func ProviderHandler(params *ProviderParams, directoryProvider bool) http.HandlerFunc {
Expand Down Expand Up @@ -88,14 +88,15 @@ func TestShaMarking(t *testing.T) {
tt.Parallel()
serverURL := ""
params := ProviderParams{
url: "",
enableSha256: true,
enableSha512: true,
URL: "",
EnableSha256: true,
EnableSha512: true,
}
server := httptest.NewTLSServer(ProviderHandler(&params, test.directoryProvider))
defer server.Close()

serverURL = server.URL
params.URL = server.URL

hClient := server.Client()
client := util.Client(hClient)
Expand Down
8 changes: 4 additions & 4 deletions testdata/simple-rolie-provider/provider-metadata.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"canonical_url": "/provider-metadata.json",
"canonical_url": "{{.URL}}/provider-metadata.json",
"distributions": [
{
"rolie": {
"feeds": [
{
"summary": "TLP:WHITE advisories",
"tlp_label": "WHITE",
"url": "/white/white-feed.json"
"url": "{{.URL}}/white/white-feed.json"
}
]
}
}
],
"last_updated": "2020-00-00T00:00:00Z",
"last_updated": "2020-01-01T00:00:00Z",
"list_on_CSAF_aggregators": true,
"metadata_version": "2.0",
"mirror_on_CSAF_aggregators": true,
"public_openpgp_keys": [
{
"fingerprint": "A8914CA2F11139C6A69A0018FB3CD9B15DE61596",
"url": "/openpgp/pubkey.asc"
"url": "{{.URL}}/openpgp/pubkey.asc"
}
],
"publisher": {
Expand Down

0 comments on commit 989e366

Please sign in to comment.