Filesharing Integration Test + Drone
This commit is contained in:
parent
f4af0b3c63
commit
a15dee2b76
|
@ -42,6 +42,14 @@ pipeline:
|
||||||
event: [ push, pull_request ]
|
event: [ push, pull_request ]
|
||||||
commands:
|
commands:
|
||||||
- go test -race -v cwtch.im/cwtch/testing/
|
- go test -race -v cwtch.im/cwtch/testing/
|
||||||
|
filesharing-integ-test:
|
||||||
|
image: golang
|
||||||
|
when:
|
||||||
|
repo: cwtch.im/cwtch
|
||||||
|
branch: master
|
||||||
|
event: [ push, pull_request ]
|
||||||
|
commands:
|
||||||
|
- go test -race -v cwtch.im/cwtch/testing/filesharing
|
||||||
notify-email:
|
notify-email:
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
host: build.openprivacy.ca
|
host: build.openprivacy.ca
|
||||||
|
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
@ -112,7 +112,6 @@ func TestFileSharing(t *testing.T) {
|
||||||
|
|
||||||
bob.AddContact("alice?", alice.GetOnion(), model.AuthApproved)
|
bob.AddContact("alice?", alice.GetOnion(), model.AuthApproved)
|
||||||
alice.PeerWithOnion(bob.GetOnion())
|
alice.PeerWithOnion(bob.GetOnion())
|
||||||
bob.PeerWithOnion(alice.GetOnion())
|
|
||||||
|
|
||||||
fmt.Println("Waiting for alice and Bob to peer...")
|
fmt.Println("Waiting for alice and Bob to peer...")
|
||||||
waitForPeerPeerConnection(t, alice, bob)
|
waitForPeerPeerConnection(t, alice, bob)
|
||||||
|
@ -124,7 +123,7 @@ func TestFileSharing(t *testing.T) {
|
||||||
err = filesharingFunctionality.ShareFile("cwtch.png", alice, bob.GetOnion())
|
err = filesharingFunctionality.ShareFile("cwtch.png", alice, bob.GetOnion())
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error!")
|
t.Fatalf("Error!: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for the messages to arrive...
|
// Wait for the messages to arrive...
|
||||||
|
@ -140,7 +139,7 @@ func TestFileSharing(t *testing.T) {
|
||||||
err := json.Unmarshal([]byte(messageWrapper.Data), &fileMessageOverlay)
|
err := json.Unmarshal([]byte(messageWrapper.Data), &fileMessageOverlay)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
filesharingFunctionality.DownloadFile(bob, alice.GetOnion(), "cwtch.out.png","cwtch.out.png.manifest", fmt.Sprintf("%s.%s", fileMessageOverlay.Hash, fileMessageOverlay.Nonce))
|
filesharingFunctionality.DownloadFile(bob, alice.GetOnion(), "cwtch.out.png", "cwtch.out.png.manifest", fmt.Sprintf("%s.%s", fileMessageOverlay.Hash, fileMessageOverlay.Nonce))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue