Skip to content

Commit

Permalink
Merge pull request #11 from ncdc/add-client-go-auth-providers
Browse files Browse the repository at this point in the history
Add client-go auth provider plugins
  • Loading branch information
skriss authored Aug 7, 2017
2 parents 045e538 + 9dcff62 commit 46cbb87
Show file tree
Hide file tree
Showing 36 changed files with 2,223 additions and 3,492 deletions.
30 changes: 22 additions & 8 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions pkg/client/auth_providers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright 2017 Heptio Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package client

// Make sure we import the client-go auth provider plugins.

import (
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
)
2 changes: 1 addition & 1 deletion pkg/controller/backup_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestProcessBackup(t *testing.T) {
require.Error(t, err, "processBackup should error")
return
}
require.NoErrorf(t, err, "processBackup unexpected error: %v", err)
require.NoError(t, err, "processBackup unexpected error: %v", err)

if !test.expectBackup {
assert.Empty(t, backupper.Calls)
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/schedule_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestProcessSchedule(t *testing.T) {
)
if test.fakeClockTime != "" {
testTime, err = time.Parse("2006-01-02 15:04:05", test.fakeClockTime)
require.NoErrorf(t, err, "unable to parse test.fakeClockTime: %v", err)
require.NoError(t, err, "unable to parse test.fakeClockTime: %v", err)
}
c.clock = clock.NewFakeClock(testTime)

Expand All @@ -161,7 +161,7 @@ func TestProcessSchedule(t *testing.T) {
key := test.scheduleKey
if key == "" && test.schedule != nil {
key, err = cache.MetaNamespaceKeyFunc(test.schedule)
require.NoErrorf(t, err, "error getting key from test.schedule: %v", err)
require.NoError(t, err, "error getting key from test.schedule: %v", err)
}

err = c.processSchedule(key)
Expand Down Expand Up @@ -246,13 +246,13 @@ func TestGetNextRunTime(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
cronSchedule, err := cron.Parse(test.schedule.Spec.Schedule)
require.NoErrorf(t, err, "unable to parse test.schedule.Spec.Schedule: %v", err)
require.NoError(t, err, "unable to parse test.schedule.Spec.Schedule: %v", err)

testClock := clock.NewFakeClock(time.Now())

if test.lastRanOffset != "" {
offsetDuration, err := time.ParseDuration(test.lastRanOffset)
require.NoErrorf(t, err, "unable to parse test.lastRanOffset: %v", err)
require.NoError(t, err, "unable to parse test.lastRanOffset: %v", err)

test.schedule.Status.LastBackup = metav1.Time{Time: testClock.Now().Add(-offsetDuration)}
}
Expand Down Expand Up @@ -360,7 +360,7 @@ func TestGetBackup(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
testTime, err := time.Parse("2006-01-02 15:04:05", test.testClockTime)
require.NoErrorf(t, err, "unable to parse test.testClockTime: %v", err)
require.NoError(t, err, "unable to parse test.testClockTime: %v", err)

backup := getBackup(test.schedule, clock.NewFakeClock(testTime).Now())

Expand Down
6 changes: 2 additions & 4 deletions vendor/github.com/davecgh/go-spew/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions vendor/github.com/davecgh/go-spew/spew/bypass.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/davecgh/go-spew/spew/common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions vendor/github.com/davecgh/go-spew/spew/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions vendor/github.com/davecgh/go-spew/spew/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions vendor/github.com/davecgh/go-spew/spew/dump.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/davecgh/go-spew/spew/format.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/davecgh/go-spew/spew/spew.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 46cbb87

Please sign in to comment.