Skip to content

Commit

Permalink
Add licence statements
Browse files Browse the repository at this point in the history
Signed-off-by: Sergen Yalçın <[email protected]>
  • Loading branch information
sergenyalcin committed Nov 13, 2023
1 parent c5e4c4d commit 7e3c1a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions pkg/controller/external_async_nofork_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0

package controller

import (
Expand Down Expand Up @@ -87,7 +91,7 @@ func prepareNoForkAsyncExternal(r Resource, cfg *config.Resource, fns CallbackFn
"name": "example",
},
rawConfig: rawConfig,
logger: log,
logger: logTest,
opTracker: NewAsyncTracker(),
},
callback: fns,
Expand Down Expand Up @@ -121,7 +125,7 @@ func TestAsyncNoForkConnect(t *testing.T) {
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
c := NewNoForkAsyncConnector(nil, tc.args.ots, tc.args.setupFn, tc.args.cfg, WithNoForkAsyncLogger(log))
c := NewNoForkAsyncConnector(nil, tc.args.ots, tc.args.setupFn, tc.args.cfg, WithNoForkAsyncLogger(logTest))
_, err := c.Connect(context.TODO(), tc.args.obj)
if diff := cmp.Diff(tc.want.err, err, test.EquateErrors()); diff != "" {
t.Errorf("\n%s\nConnect(...): -want error, +got error:\n", diff)
Expand Down
12 changes: 8 additions & 4 deletions pkg/controller/external_nofork_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0

package controller

import (
Expand All @@ -24,8 +28,8 @@ import (

var (
zl = zap.New(zap.UseDevMode(true))
log = logging.NewLogrLogger(zl.WithName("provider-aws"))
ots = NewOperationStore(log)
logTest = logging.NewLogrLogger(zl.WithName("provider-aws"))
ots = NewOperationStore(logTest)
timeout = time.Duration(1200000000000)
cfg = &config.Resource{
TerraformResource: &schema.Resource{
Expand Down Expand Up @@ -94,7 +98,7 @@ func prepareNoForkExternal(r Resource, cfg *config.Resource) *noForkExternal {
"name": "example",
},
rawConfig: rawConfig,
logger: log,
logger: logTest,
opTracker: NewAsyncTracker(),
}
}
Expand Down Expand Up @@ -140,7 +144,7 @@ func TestNoForkConnect(t *testing.T) {

for name, tc := range cases {
t.Run(name, func(t *testing.T) {
c := NewNoForkConnector(nil, tc.args.setupFn, tc.args.cfg, tc.args.ots, WithNoForkLogger(log))
c := NewNoForkConnector(nil, tc.args.setupFn, tc.args.cfg, tc.args.ots, WithNoForkLogger(logTest))
_, err := c.Connect(context.TODO(), tc.args.obj)
if diff := cmp.Diff(tc.want.err, err, test.EquateErrors()); diff != "" {
t.Errorf("\n%s\nConnect(...): -want error, +got error:\n", diff)
Expand Down

0 comments on commit 7e3c1a3

Please sign in to comment.