Closed rishiloyola closed 7 years ago
The intent is correct, but I don't understand your statement "that we don't have to create test files". You did create a test file plus put it in repository itself. Why to keep file in repository? Plus the content of the file is not what we need anyway. We'll not transferring text files, it will be binary ones. That's why I think having test create a file is more appropriate. Later we'll work with specific format and we can adjust code to create that format during a test.
On 0, Rishi notifications@github.com wrote:
rishiloyola commented on this pull request.
@@ -0,0 +1 @@ +224e6f7468696e6720746f20646f3f22aa4e6f7468696e6720746f20646f3f204e6f7468696e6720746f20646f3fa50757420736f6d65206d75737461726420696e20796f75722073686f652ca46696c6c20796f757220706f636b6574732066756c6c206f6620736f6f742ca44726976652061206e61696c20696e746f20796f757220666f6f742ca50757420736f6d6520737567617220696e20796f757220686169722ca506c61636520796f757220746f79732075706f6e207468652073746169722ca536d65617220736f6d65206a656c6c79206f6e20746865206c617463682ca45617420736f6d65206d756420616e6420737472696b652061206d617463682ca4472617720612070696374757265206f6e207468652077616c6c2ca526f6c6c20736f6d65206d6172626c657320646f776e207468652068616c6c2ca506f757220736f6d6520696e6b20696e2044616464792773206361702d2d2da4e6f7720676f20757073746169727320616e642074616b652061206e61702eaa2020202020202020206279205368656c6c65792053696c766572737465696e
I want to make it automated. So that we don't have to create test files. Just run one command and that's it.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/vkuznet/transfer2go/pull/20#discussion_r115800712
@vkuznet I wrote a script to create and delete the test-data file at runtime. Check out my last commit.
On 0, Rishi notifications@github.com wrote:
rishiloyola commented on this pull request.
- assert.Equal(test.expectedStatusCode, resp.StatusCode, test.description)
- assert.Equal(test.expectedBody, data["Test"], test.description)
+}
+func TestWriteTFC(t *testing.T) {
- assert := assert.New(t)
- test := tests{
- description: "Check TFC upload functionality",
- url: url + "/tfc",
- expectedStatusCode: 200,
- expectedBody: "http://localhost:8989",
- }
- f, err := os.Create("data/testdata.txt")
I created separate space to store the test data configuration. I think so it will be good if we create this testdata.txt inside that folder.
ok
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/vkuznet/transfer2go/pull/20#discussion_r116068006
@vkuznet Please review my last commit. Actually, I wrote a new test.sh
file which can start two agents automatically and can register one agent with another one. It also runs all the test cases in the end to test the agent registration process. This environment will also help to test the data transfer methods.
One single command to test entire project:
bash test.sh
@vkuznet Checkout test of cp
protocol. If everything sounds good to you then merge this pull request.
@vkuznet Done.
@vkuznet merge this request I will send new changes in another pull request.
Merged.
On 0, Rishi notifications@github.com wrote:
@vkuznet merge this request I will send new changes in another pull request.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/vkuznet/transfer2go/pull/20#issuecomment-302063582
Regarding issue #1