Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: containers/image
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 625295f8c247604e159917fd6ecf26be367f1c03
Choose a base ref
..
head repository: containers/image
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: adcbd741684d568acc3d428acc780a6bb412e1d4
Choose a head ref
Showing with 6 additions and 4 deletions.
  1. +4 −2 ostree/ostree_transport_test.go
  2. +2 −2 signature/policy_config_test.go
6 changes: 4 additions & 2 deletions ostree/ostree_transport_test.go
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
package ostree

import (
"context"
"fmt"
"io/ioutil"
"os"
@@ -260,7 +261,7 @@ func TestReferenceNewImageDestination(t *testing.T) {
defer os.RemoveAll(otherTmpDir)

for _, c := range []struct {
ctx *types.SystemContext
sys *types.SystemContext
tmpDir string
}{
{nil, os.TempDir()},
@@ -269,7 +270,8 @@ func TestReferenceNewImageDestination(t *testing.T) {
} {
ref, err := Transport.ParseReference("busybox")
require.NoError(t, err)
dest, err := ref.NewImageDestination(c.ctx)
ctx := types.WithSystemContext(context.TODO(), c.sys)
dest, err := ref.NewImageDestination(ctx)
require.NoError(t, err)
ostreeDest, ok := dest.(*ostreeImageDestination)
require.True(t, ok)
4 changes: 2 additions & 2 deletions signature/policy_config_test.go
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ func TestDefaultPolicyPath(t *testing.T) {
const rootPrefix = "/root/prefix"

for _, c := range []struct {
ctx *types.SystemContext
sys *types.SystemContext
expected string
}{
// The common case
@@ -119,7 +119,7 @@ func TestDefaultPolicyPath(t *testing.T) {
// No environment expansion happens in the overridden paths
{&types.SystemContext{SignaturePolicyPath: variableReference}, variableReference},
} {
path := defaultPolicyPath(c.ctx)
path := defaultPolicyPath(c.sys)
assert.Equal(t, c.expected, path)
}
}