-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finalize code structure for experiment replication (#43)
* refactor: entry point for main application, build information, & testing * feat: split input & output metadata via project settings * fix: repackaged JSON object contents + diode metadata * docs: update main program directory name * Saturate components for testing diode system behavior (#42)
- Loading branch information
1 parent
c10a4ba
commit f036b1d
Showing
13 changed files
with
61 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
BIN_NAME=diode | ||
BIN_VERSION=0.1.1 | ||
BIN_VERSION=0.1.2 | ||
BIN_DATE=$(shell date +%FT%T%z) | ||
|
||
all: build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
package utility | ||
|
||
import "testing" | ||
import ( | ||
"net" | ||
"testing" | ||
) | ||
|
||
func TestClient(t *testing.T) { | ||
got := "server" | ||
want := "client" | ||
|
||
if got != want { | ||
t.Errorf("got %q, want %q", got, want) | ||
func TestRecieveMessage(t *testing.T) { | ||
serverMock, err := net.Listen("tcp", "localhost:0") | ||
if err != nil { | ||
t.Fatalf("[!] Failed to start the mock server: %v", err) | ||
} | ||
} | ||
defer serverMock.Close() | ||
|
||
serverMockAddress := serverMock.Addr().String() | ||
|
||
func TestServer(t *testing.T) { | ||
got := "client" | ||
want := "server" | ||
contents := make(chan string) | ||
go func() { | ||
err := RecieveMessage(serverMockAddress, contents) | ||
if err != nil { | ||
t.Errorf("[?] Returned an error: %v", err) | ||
} | ||
}() | ||
|
||
if got != want { | ||
t.Errorf("got %q, want %q", got, want) | ||
conn, err := net.Dial("tcp", serverMockAddress) | ||
if err != nil { | ||
t.Fatalf("[!] Failed to connect to the mock server: %v", err) | ||
} | ||
defer conn.Close() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters