Skip to content

Commit

Permalink
re-organize service-test-x testing services
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz committed Aug 24, 2018
1 parent df406f2 commit d464355
Show file tree
Hide file tree
Showing 29 changed files with 28 additions and 109 deletions.
4 changes: 2 additions & 2 deletions api/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

func TestDeployService(t *testing.T) {
path := "./service-test"
path := "../service-test/task"

a, dt := newAPIAndDockerTest(t)
dt.ProvideImageBuild(ioutil.NopCloser(strings.NewReader(`{"stream":"sha256:x"}`)), nil)
Expand Down Expand Up @@ -67,7 +67,7 @@ func TestDeployService(t *testing.T) {
}

func TestDeployInvalidService(t *testing.T) {
path := "./service-test-invalid"
path := "../service-test/invalid"

a, dt := newAPIAndDockerTest(t)
dt.ProvideImageBuild(ioutil.NopCloser(strings.NewReader(`{"stream":"sha256:x"}`)), nil)
Expand Down
Empty file removed api/service-test/Dockerfile
Empty file.
20 changes: 0 additions & 20 deletions api/service-test/mesg.yml

This file was deleted.

2 changes: 1 addition & 1 deletion interface/grpc/core/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestDeleteService(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
server = newServer(t)
)

Expand Down
8 changes: 4 additions & 4 deletions interface/grpc/core/execute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func TestExecute(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
taskKey = "call"
data = `{"url": "https://mesg.tech", "data": {}, "headers": {}}`
server = newServer(t)
Expand All @@ -36,7 +36,7 @@ func TestExecute(t *testing.T) {

func TestExecuteWithInvalidJSON(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
server = newServer(t)
)

Expand All @@ -56,7 +56,7 @@ func TestExecuteWithInvalidJSON(t *testing.T) {

func TestExecuteWithInvalidTask(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
server = newServer(t)
)

Expand All @@ -79,7 +79,7 @@ func TestExecuteWithInvalidTask(t *testing.T) {

func TestExecuteWithNonRunningService(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
server = newServer(t)
)

Expand Down
2 changes: 1 addition & 1 deletion interface/grpc/core/get_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestGetService(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
server = newServer(t)
)

Expand Down
4 changes: 0 additions & 4 deletions interface/grpc/core/service-test-event/index.js

This file was deleted.

4 changes: 0 additions & 4 deletions interface/grpc/core/service-test-task/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion interface/grpc/core/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestStartService(t *testing.T) {
// we use a test service without tasks definition here otherwise we need to
// spin up the gRPC server in order to prevent service exit with a failure
// because it'll try to listen for tasks.
path = "./service-test-event"
path = "../../service-test/event"
server = newServer(t)
)

Expand Down
2 changes: 1 addition & 1 deletion interface/grpc/core/stop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestStopService(t *testing.T) {
// we use a test service without tasks definition here otherwise we need to
// spin up the gRPC server in order to prevent service exit with a failure
// because it'll try to listen for tasks.
path = "./service-test-event"
path = "../../service-test/event"
server = newServer(t)
)

Expand Down
8 changes: 4 additions & 4 deletions interface/grpc/service/emit_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func TestEmit(t *testing.T) {
var (
path = "./service-test-event"
path = "../../service-test/event"
eventKey = "request"
eventData = `{"data":{}}`
server = newServer(t)
Expand Down Expand Up @@ -45,7 +45,7 @@ func TestEmit(t *testing.T) {

func TestEmitNoData(t *testing.T) {
var (
path = "./service-test-event"
path = "../../service-test/event"
eventKey = "request"
server = newServer(t)
)
Expand All @@ -64,7 +64,7 @@ func TestEmitNoData(t *testing.T) {

func TestEmitWrongData(t *testing.T) {
var (
path = "./service-test-event"
path = "../../service-test/event"
eventKey = "request"
server = newServer(t)
)
Expand All @@ -84,7 +84,7 @@ func TestEmitWrongData(t *testing.T) {

func TestEmitWrongEvent(t *testing.T) {
var (
path = "./service-test-event"
path = "../../service-test/event"
eventKey = "test"
server = newServer(t)
)
Expand Down
6 changes: 0 additions & 6 deletions interface/grpc/service/service-test-event/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions interface/grpc/service/service-test-event/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions interface/grpc/service/service-test-event/mesg.yml

This file was deleted.

12 changes: 0 additions & 12 deletions interface/grpc/service/service-test-event/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions interface/grpc/service/service-test-task/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions interface/grpc/service/service-test-task/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions interface/grpc/service/service-test-task/mesg.yml

This file was deleted.

12 changes: 0 additions & 12 deletions interface/grpc/service/service-test-task/package.json

This file was deleted.

4 changes: 2 additions & 2 deletions interface/grpc/service/submit_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func TestSubmit(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
taskKey = "call"
taskData = map[string]interface{}{
"url": "https://mesg.tech",
Expand Down Expand Up @@ -57,7 +57,7 @@ func TestSubmit(t *testing.T) {

func TestSubmitWithInvalidJSON(t *testing.T) {
var (
path = "./service-test-task"
path = "../../service-test/task"
taskKey = "call"
taskData = map[string]interface{}{
"url": "https://mesg.tech",
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions service-test/event/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const MESG = require("mesg-js").service();
const app = require("express")();

app.listen(3000, () => {
console.log("Example app listening on port 3000!");
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions service-test/task/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const MESG = require("mesg-js").service();
const app = require("express")();

app.listen(3000, () => {
console.log("Example app listening on port 3000!");
});
File renamed without changes.
File renamed without changes.

0 comments on commit d464355

Please sign in to comment.