From aff4790d22728d89e7e2dac8af262c92087b5b39 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 11 Sep 2021 12:27:59 +0200 Subject: Piece evry last week changes together in a big rewrite of the webui --- pkg/config/config_test.go | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'pkg/config/config_test.go') diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 02f2840..43d4a48 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -11,26 +11,23 @@ import ( func TestLoadFile(t *testing.T) { // Minimal yaml file minimalConfig := Config{ - Address: "127.0.0.1", - Port: "8080", - Token: "12345678-9abc-def0-1234-56789abcdef0", - TrainStop: "ABCD:test:01", + Address: "127.0.0.1", + Port: "8080", + Token: "12345678-9abc-def0-1234-56789abcdef0", } // Minimal yaml file with hostname resolving minimalConfigWithResolving := Config{ - Address: "localhost", - Port: "www", - Token: "12345678-9abc-def0-1234-56789abcdef0", - TrainStop: "VWXY_Z:test:90", + Address: "localhost", + Port: "www", + Token: "12345678-9abc-def0-1234-56789abcdef0", } // Complete yaml file completeConfig := Config{ - Address: "127.0.0.2", - Port: "8082", - Token: "12345678-9abc-def0-1234-56789abcdef0", - TrainStop: "ABCD:test:01", + Address: "127.0.0.2", + Port: "8082", + Token: "12345678-9abc-def0-1234-56789abcdef0", } // Test cases @@ -46,7 +43,6 @@ func TestLoadFile(t *testing.T) { {"Unresolvable address should fail to load", "test_data/invalid_address_unresolvable.yaml", nil, &InvalidAddressError{}}, {"Invalid port should fail to load", "test_data/invalid_port.yaml", nil, &InvalidPortError{}}, {"Invalid token should fail to load", "test_data/invalid_token.yaml", nil, &InvalidTokenError{}}, - {"Invalid trainStop should fail to load", "test_data/invalid_trainStop.yaml", nil, &InvalidTrainStopError{}}, {"Minimal config", "test_data/minimal.yaml", &minimalConfig, nil}, {"Minimal config with resolving", "test_data/minimal_with_hostname.yaml", &minimalConfigWithResolving, nil}, {"Complete config", "test_data/complete.yaml", &completeConfig, nil}, -- cgit v1.2.3