From 7e3c1a3f11b33e1c9c685acfc2ef7f96666d93f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergen=20Yal=C3=A7=C4=B1n?= Date: Mon, 13 Nov 2023 12:15:32 +0300 Subject: [PATCH] Add licence statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sergen Yalçın --- pkg/controller/external_async_nofork_test.go | 8 ++++++-- pkg/controller/external_nofork_test.go | 12 ++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pkg/controller/external_async_nofork_test.go b/pkg/controller/external_async_nofork_test.go index 47f3737a..7acd0ae4 100644 --- a/pkg/controller/external_async_nofork_test.go +++ b/pkg/controller/external_async_nofork_test.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + package controller import ( @@ -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, @@ -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) diff --git a/pkg/controller/external_nofork_test.go b/pkg/controller/external_nofork_test.go index cd854ea5..e6f96dd8 100644 --- a/pkg/controller/external_nofork_test.go +++ b/pkg/controller/external_nofork_test.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + package controller import ( @@ -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{ @@ -94,7 +98,7 @@ func prepareNoForkExternal(r Resource, cfg *config.Resource) *noForkExternal { "name": "example", }, rawConfig: rawConfig, - logger: log, + logger: logTest, opTracker: NewAsyncTracker(), } } @@ -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)