Skip to content

Commit

Permalink
[Fix] tests
Browse files Browse the repository at this point in the history
  • Loading branch information
purplesmoke05 committed Feb 11, 2018
1 parent fd34b2a commit 0d072dc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var (
Name: "tiborvass/sample-volume-plugin",
Tag: "latest",
Active: true,
Settings: PluginSetting{
Settings: PluginSettings{
Env: []string{"DEBUG=0"},
Args: nil,
Devices: nil,
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestListPlugins(t *testing.T) {
t.Fatal(err)
}
client := newTestClient(&FakeRoundTripper{message: jsonPlugins, status: http.StatusOK})
pluginDetails, err := client.ListPlugins()
pluginDetails, err := client.ListPlugins(context.Background())
if err != nil {
t.Fatal(err)
}
Expand All @@ -196,7 +196,7 @@ func TestGetPluginPrivileges(t *testing.T) {
Description: "",
Value: []string{"host"},
}}
pluginPrivileges, err := client.GetPluginPrivileges(name)
pluginPrivileges, err := client.GetPluginPrivileges(name,context.Background())
if err != nil {
t.Fatal(err)
}
Expand All @@ -216,10 +216,11 @@ func TestInstallPlugins(t *testing.T) {
},
},
Context: context.Background(),
Auth: AuthConfiguration{},
}
auth := AuthConfiguration{}

client := newTestClient(&FakeRoundTripper{message: "", status: http.StatusOK})
err := client.InstallPlugins(opts, auth)
err := client.InstallPlugins(opts)
if err != nil {
t.Fatal(err)
}
Expand All @@ -229,7 +230,7 @@ func TestInspectPlugin(t *testing.T) {
name := "test_plugin"
fakeRT := &FakeRoundTripper{message: jsonPluginDetail, status: http.StatusNoContent}
client := newTestClient(fakeRT)
pluginPrivileges, err := client.InspectPlugins(name)
pluginPrivileges, err := client.InspectPlugins(name,context.Background())
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 0d072dc

Please sign in to comment.