Skip to content

Commit 5774b86

Browse files
committed
fix .travis.yml
1 parent a570bb5 commit 5774b86

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
- stage: test
132132
name: Unit, Sanity, and Markdown Tests
133133
before_install:
134-
- go get github.com/mattn/goveralls
134+
- (cd / && go get github.com/mattn/goveralls)
135135
script:
136136
- make test-sanity test-unit test-markdown
137137
- $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN

pkg/status/conditions.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ func (c Condition) IsUnknown() bool {
7474
}
7575

7676
// DeepCopy returns a deep copy of the condition
77-
func (c Condition) DeepCopy() *Condition {
78-
return &c
77+
func (c *Condition) DeepCopy() *Condition {
78+
if c == nil {
79+
return nil
80+
}
81+
out := *c
82+
return &out
7983
}
8084

8185
// Conditions is a set of Condition instances.

pkg/status/conditions_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func withLastTransitionTime(c Condition, t time.Time) Condition {
7070
}
7171

7272
func TestConditionDeepCopy(t *testing.T) {
73+
var n *Condition
74+
assert.Nil(t, n.DeepCopy())
75+
7376
a := generateCondition("A", corev1.ConditionTrue)
7477
aCopy := a.DeepCopy()
7578
if &a == aCopy {

0 commit comments

Comments
 (0)