Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions args_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ func TestArgsParsing(t *testing.T) {
[][]string{
{
programName,
"--key", "testclient.key",
"--cert", "testclient.cert",
"--key", "testdata/testclient.key",
"--cert", "testdata/testclient.cert",
"https://somehost.somedomain",
},
{
programName,
"--key=testclient.key",
"--cert=testclient.cert",
"--key=testdata/testclient.key",
"--cert=testdata/testclient.cert",
"https://somehost.somedomain",
},
},
Expand All @@ -212,8 +212,8 @@ func TestArgsParsing(t *testing.T) {
timeout: defaultTimeout,
headers: new(headersList),
method: "GET",
keyPath: "testclient.key",
certPath: "testclient.cert",
keyPath: "testdata/testclient.key",
certPath: "testdata/testclient.cert",
url: ParseURLOrPanic("https://somehost.somedomain"),
printIntro: true,
printProgress: true,
Expand Down Expand Up @@ -404,17 +404,17 @@ func TestArgsParsing(t *testing.T) {
[][]string{
{
programName,
"--body-file=testbody.txt",
"--body-file=testdata/testbody.txt",
"https://somehost.somedomain",
},
{
programName,
"--body-file", "testbody.txt",
"--body-file", "testdata/testbody.txt",
"https://somehost.somedomain",
},
{
programName,
"-f", "testbody.txt",
"-f", "testdata/testbody.txt",
"https://somehost.somedomain",
},
},
Expand All @@ -423,7 +423,7 @@ func TestArgsParsing(t *testing.T) {
timeout: defaultTimeout,
headers: new(headersList),
method: "GET",
bodyFilePath: "testbody.txt",
bodyFilePath: "testdata/testbody.txt",
url: ParseURLOrPanic("https://somehost.somedomain"),
printIntro: true,
printProgress: true,
Expand Down
12 changes: 6 additions & 6 deletions bombardier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func TestBombardierClientCerts(t *testing.T) {
}

func testBombardierClientCerts(clientType clientTyp, t *testing.T) {
clientCert, err := tls.LoadX509KeyPair("testclient.cert", "testclient.key")
clientCert, err := tls.LoadX509KeyPair("testdata/testclient.cert", "testdata/testclient.key")
if err != nil {
t.Error(err)
return
Expand All @@ -368,7 +368,7 @@ func testBombardierClientCerts(clientType clientTyp, t *testing.T) {
return
}

servertCert, err := tls.LoadX509KeyPair("testserver.cert", "testserver.key")
servertCert, err := tls.LoadX509KeyPair("testdata/testserver.cert", "testdata/testserver.key")
if err != nil {
t.Error(err)
return
Expand Down Expand Up @@ -408,8 +408,8 @@ func testBombardierClientCerts(clientType clientTyp, t *testing.T) {
method: "GET",
body: "",
printLatencies: true,
certPath: "testclient.cert",
keyPath: "testclient.key",
certPath: "testdata/testclient.cert",
keyPath: "testdata/testclient.key",
insecure: true,
clientType: clientType,
format: knownFormat("plain-text"),
Expand Down Expand Up @@ -529,7 +529,7 @@ func TestBombardierSendsBodyFromFile(t *testing.T) {

func testBombardierSendsBodyFromFile(clientType clientTyp, t *testing.T) {
response := []byte("OK")
bodyPath := "testbody.txt"
bodyPath := "testdata/testbody.txt"
requestBody, err := ioutil.ReadFile(bodyPath)
if err != nil {
t.Error(err)
Expand Down Expand Up @@ -643,7 +643,7 @@ func TestBombardierStreamsBodyFromFile(t *testing.T) {

func testBombardierStreamsBodyFromFile(clientType clientTyp, t *testing.T) {
response := []byte("OK")
bodyPath := "testbody.txt"
bodyPath := "testdata/testbody.txt"
requestBody, err := ioutil.ReadFile(bodyPath)
if err != nil {
t.Error(err)
Expand Down
4 changes: 2 additions & 2 deletions client_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ func TestGenerateTLSConfig(t *testing.T) {
errIsNil bool
}{
{
certPath: "testclient.cert",
keyPath: "testclient.key",
certPath: "testdata/testclient.cert",
keyPath: "testdata/testclient.key",
errIsNil: true,
},
{
Expand Down
6 changes: 3 additions & 3 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestCheckArgs(t *testing.T) {
headers: noHeaders,
timeout: defaultTimeout,
method: "HEAD",
bodyFilePath: "testbody.txt",
bodyFilePath: "testdata/testbody.txt",
format: knownFormat("plain-text"),
},
errBodyNotAllowed,
Expand Down Expand Up @@ -166,7 +166,7 @@ func TestCheckArgs(t *testing.T) {
headers: noHeaders,
timeout: defaultTimeout,
method: "GET",
bodyFilePath: "testbody.txt",
bodyFilePath: "testdata/testbody.txt",
format: knownFormat("plain-text"),
},
nil,
Expand Down Expand Up @@ -241,7 +241,7 @@ func TestCheckArgs(t *testing.T) {
timeout: defaultTimeout,
method: "POST",
body: "abracadabra",
bodyFilePath: "testbody.txt",
bodyFilePath: "testdata/testbody.txt",
format: knownFormat("plain-text"),
},
errBodyProvidedTwice,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.