aboutsummaryrefslogtreecommitdiff
path: root/plugin/etcd/setup_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/etcd/setup_test.go')
-rw-r--r--plugin/etcd/setup_test.go25
1 files changed, 19 insertions, 6 deletions
diff --git a/plugin/etcd/setup_test.go b/plugin/etcd/setup_test.go
index 833e2ba4c..517aeea54 100644
--- a/plugin/etcd/setup_test.go
+++ b/plugin/etcd/setup_test.go
@@ -12,25 +12,31 @@ func TestSetupEtcd(t *testing.T) {
input string
shouldErr bool
expectedPath string
- expectedEndpoint string
+ expectedEndpoint []string
expectedErrContent string // substring from the expected error. Empty for positive cases.
}{
// positive
{
- `etcd`, false, "skydns", "http://localhost:2379", "",
+ `etcd`, false, "skydns", []string{"http://localhost:2379"}, "",
+ },
+ {
+ `etcd {
+ endpoint http://localhost:2379 http://localhost:3379 http://localhost:4379
+
+}`, false, "skydns", []string{"http://localhost:2379", "http://localhost:3379", "http://localhost:4379"}, "",
},
{
`etcd skydns.local {
endpoint localhost:300
}
-`, false, "skydns", "localhost:300", "",
+`, false, "skydns", []string{"localhost:300"}, "",
},
// negative
{
`etcd {
endpoints localhost:300
}
-`, true, "", "", "unknown property 'endpoints'",
+`, true, "", []string{""}, "unknown property 'endpoints'",
},
}
@@ -57,8 +63,15 @@ func TestSetupEtcd(t *testing.T) {
if !test.shouldErr && etcd.PathPrefix != test.expectedPath {
t.Errorf("Etcd not correctly set for input %s. Expected: %s, actual: %s", test.input, test.expectedPath, etcd.PathPrefix)
}
- if !test.shouldErr && etcd.endpoints[0] != test.expectedEndpoint { // only checks the first
- t.Errorf("Etcd not correctly set for input %s. Expected: '%s', actual: '%s'", test.input, test.expectedEndpoint, etcd.endpoints[0])
+ if !test.shouldErr {
+ if len(etcd.endpoints) != len(test.expectedEndpoint) {
+ t.Errorf("Etcd not correctly set for input %s. Expected: '%+v', actual: '%+v'", test.input, test.expectedEndpoint, etcd.endpoints)
+ }
+ for i, endpoint := range etcd.endpoints {
+ if endpoint != test.expectedEndpoint[i] {
+ t.Errorf("Etcd not correctly set for input %s. Expected: '%+v', actual: '%+v'", test.input, test.expectedEndpoint, etcd.endpoints)
+ }
+ }
}
}
}
ption> Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/docs/api/http.md (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-20Fixes #1675 (#4230)Gravatar Jarred Sumner 8-70/+297
* Fixes https://github.com/oven-sh/bun/issues/1675 * Add fallback for Bun.write * Update blob.zig * Fix test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-20Implement `--inspect-brk` (#4222)Gravatar Jarred Sumner 17-41/+101
* Implement `--inspect-brk` * Bump WebKit --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-20Fix test failures from 3a9a6c63a (#4231)Gravatar Jarred Sumner 4-32/+34
cc @Hanaasagi Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-20Fix(bundler): use different alias mappings based on the target. (#4163)Gravatar Ai Hoshino 8-18/+90
* Fix(bundler): use different alias mappings based on the target. Close: #3844 * chore: reduce duplicated code. * chore: split to two separate ComptimeStringMap.
2023-08-19Update BunDebugger.cppGravatar Jarred Sumner 1-1/+3
2023-08-19Introduce `bun --inspect-wait`Gravatar Jarred Sumner 3-19/+47
This waits for the inspector to connect before beginning execution
2023-08-19misc non-posix fixesGravatar Jarred Sumner 2-3/+3
2023-08-19Update lockfile.mdGravatar Jarred Sumner 1-1/+8
2023-08-19Update lockfile.mdGravatar Jarred Sumner 1-4/+4
2023-08-19Update lockfile.mdGravatar Jarred Sumner 1-1/+29
2023-08-19Update Dockerfile-distroless (#4210)Gravatar Omar 1-0/+1
2023-08-19Fix symbol visibilityGravatar Jarred Sumner 1-0/+1
2023-08-19[napi] Implement `node_api_create_syntax_error`, `node_api_symbol_for`, ↵Gravatar Jarred Sumner 5-1/+70
`node_api_throw_syntax_error` These were marked as experimental
2023-08-19Fix crash impacting sharp & resvg (#4221)Gravatar Jarred Sumner 5-73/+73
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-19Fixes #172 (#4220)Gravatar Jarred Sumner 7-9/+87
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-19Add inline sourcemaps when `--inspect` is enabled (#4213)Gravatar Jarred Sumner 3-3/+64
* Add inline sourcemaps when --inspect is enabled * Add some assertions * Update javascript.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-19tty `ReadStream`, `WriteStream`, and readline rawmode (#4179)Gravatar Dylan Conway 23-722/+821
* tty `WriteStream`, `ReadStream`, and rawmode * tests * refactor prototypes * fix failing test * fix test and library usage * more merge * fix child_process test * create pseudo terminal for tty tests * match node logic * handle invalid tty * close descriptors * move tests to another process * fix test again * fix test on linux
2023-08-18Fix make headers (again)Gravatar Jarred Sumner 1-0/+2