11package git
22
33import (
4+ "context"
45 "testing"
56
67 "github.com/go-git/go-git/v6/plumbing/transport"
@@ -20,7 +21,7 @@ JtdGRlLmNzYgECAw==
2021func TestGetClientOptions_HTTPToken (t * testing.T ) {
2122 m := & managerImpl {}
2223 secret := map [string ][]byte {"token" : []byte ("my-token" )}
23- opts , tmpFile , err := m .getClientOptions ("https" , secret )
24+ opts , tmpFile , err := m .getClientOptions (context . Background (), "https" , secret )
2425 if err != nil {
2526 t .Fatalf ("unexpected error: %v" , err )
2627 }
@@ -35,7 +36,7 @@ func TestGetClientOptions_HTTPToken(t *testing.T) {
3536func TestGetClientOptions_HTTPUsernamePassword (t * testing.T ) {
3637 m := & managerImpl {}
3738 secret := map [string ][]byte {"username" : []byte ("user" ), "password" : []byte ("pass" )}
38- opts , _ , err := m .getClientOptions ("http" , secret )
39+ opts , _ , err := m .getClientOptions (context . Background (), "http" , secret )
3940 if err != nil {
4041 t .Fatalf ("unexpected error: %v" , err )
4142 }
@@ -46,7 +47,7 @@ func TestGetClientOptions_HTTPUsernamePassword(t *testing.T) {
4647
4748func TestGetClientOptions_HTTPEmpty (t * testing.T ) {
4849 m := & managerImpl {}
49- opts , _ , err := m .getClientOptions ("https" , nil )
50+ opts , _ , err := m .getClientOptions (context . Background (), "https" , nil )
5051 if err != nil {
5152 t .Fatalf ("unexpected error: %v" , err )
5253 }
@@ -57,7 +58,7 @@ func TestGetClientOptions_HTTPEmpty(t *testing.T) {
5758
5859func TestGetClientOptions_SSHNoSecret (t * testing.T ) {
5960 m := & managerImpl {}
60- opts , _ , err := m .getClientOptions (sshScheme , nil )
61+ opts , _ , err := m .getClientOptions (context . Background (), sshScheme , nil )
6162 if err != nil {
6263 t .Fatalf ("unexpected error: %v" , err )
6364 }
@@ -68,7 +69,7 @@ func TestGetClientOptions_SSHNoSecret(t *testing.T) {
6869
6970func TestGetClientOptions_SSHEmptySecret (t * testing.T ) {
7071 m := & managerImpl {}
71- opts , _ , err := m .getClientOptions (sshScheme , map [string ][]byte {})
72+ opts , _ , err := m .getClientOptions (context . Background (), sshScheme , map [string ][]byte {})
7273 if err != nil {
7374 t .Fatalf ("unexpected error: %v" , err )
7475 }
@@ -80,7 +81,7 @@ func TestGetClientOptions_SSHEmptySecret(t *testing.T) {
8081func TestGetClientOptions_SSHWithPrivateKey (t * testing.T ) {
8182 m := & managerImpl {}
8283 secret := map [string ][]byte {"sshPrivateKey" : []byte (testEd25519PrivateKey )}
83- opts , _ , err := m .getClientOptions (sshScheme , secret )
84+ opts , _ , err := m .getClientOptions (context . Background (), sshScheme , secret )
8485 if err != nil {
8586 t .Fatalf ("unexpected error: %v" , err )
8687 }
@@ -92,7 +93,7 @@ func TestGetClientOptions_SSHWithPrivateKey(t *testing.T) {
9293func TestGetClientOptions_SSHWithInvalidKey (t * testing.T ) {
9394 m := & managerImpl {}
9495 secret := map [string ][]byte {"sshPrivateKey" : []byte ("not-a-valid-key" )}
95- _ , _ , err := m .getClientOptions (sshScheme , secret )
96+ _ , _ , err := m .getClientOptions (context . Background (), sshScheme , secret )
9697 if err == nil {
9798 t .Fatal ("expected error for invalid SSH key, got nil" )
9899 }
0 commit comments