temp. revert tests for file body (#3941)

* temporarily revert tests for file body
This commit is contained in:
lohit
2025-02-04 22:08:54 +05:30
committed by Anoop M D
parent 8f604efc7e
commit 038f2d1f0b
4 changed files with 0 additions and 147 deletions

View File

@@ -1,40 +0,0 @@
meta {
name: echo file body
type: http
seq: 4
}
post {
url: {{echo-host}}
body: file
auth: none
}
body:file {
file: @file(ping.bru) @contentType(bru)
}
tests {
test("should return bru file body contents", function() {
const data = res.getBody();
const expectedData = `meta {
name: ping
type: http
seq: 1
}
get {
url: {{host}}/ping
body: none
auth: none
}
`;
expect(res.getBody()).to.eql(expectedData);
});
test("should return proper header", function() {
const contentType = res.getHeader('content-type');
expect(contentType).to.eql('bru');
});
}

View File

@@ -1,22 +0,0 @@
meta {
name: echo image body
type: http
seq: 1
}
post {
url: {{echo-host}}
body: file
auth: none
}
body:file {
file: @file(bruno.png) @contentType(image/png)
}
tests {
test("should return proper header", function() {
const contentType = res.getHeader('content-type');
expect(contentType).to.eql('image/png');
});
}

View File

@@ -1,55 +0,0 @@
meta {
name: echo json file body
type: http
seq: 2
}
post {
url: {{echo-host}}
body: file
auth: none
}
body:file {
file: @file(file.json) @contentType(application/json; charset=utf-8)
}
tests {
test("should return json file body contents buffer", function() {
const data = res.getBody();
expect(res.getBody()).to.eql({
"type": "Buffer",
"data": [
123,
10,
32,
32,
34,
104,
101,
108,
108,
111,
34,
58,
32,
34,
98,
114,
117,
110,
111,
34,
10,
125,
10
]
});
});
test("should return proper header", function() {
const contentType = res.getHeader('content-type');
expect(contentType).to.eql('application/json; charset=utf-8');
});
}

View File

@@ -1,30 +0,0 @@
meta {
name: echo text file body
type: http
seq: 3
}
post {
url: {{echo-host}}
body: file
auth: none
}
body:file {
file: @file(file.txt) @contentType(text/plain; charset=utf-8)
}
tests {
test("should return json file body contents", function() {
const data = res.getBody();
const expectedData = `file.txt
hello, bruno`;
expect(res.getBody()).to.eql(expectedData);
});
test("should return proper header", function() {
const contentType = res.getHeader('content-type');
expect(contentType).to.eql('text/plain; charset=utf-8');
});
}