Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Commit

Permalink
Clean up client test names.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbreen committed Jan 10, 2015
1 parent 9efbe09 commit eb1b336
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/client_library_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,47 @@ var create_client_test = function(verb, cmd, cwd, key) {
// functionality to validate that requests can be sent through auth_proxy properly using various languages.
describe('Client library tests', function() {

it ('should support requests from ruby', function(done) {
it ('should support requests from Ruby clients', function(done) {
var rubyTest = create_client_test('GET', 'ruby client.rb', 'test/clients/ruby', 'ruby-test-key')
rubyTest(done);
});

it ('should support requests from java', function(done) {
it ('should support requests from Java clients', function(done) {
var javaTest = create_client_test('POST',
'java -cp target/OAuthClient-1.0-SNAPSHOT-jar-with-dependencies.jar com.cimpress.mcp.oauth.OAuthClient',
'test/clients/java/OAuthClient', 'java-test-key')
javaTest(done);
});

it ('should support requests from node.js', function(done) {
it ('should support requests from Node.js clients', function(done) {
var nodeTest = create_client_test('POST', 'node client.js', 'test/clients/node', 'node-test-key')
nodeTest(done);
});

it ('should support requests from perl', function(done) {
it ('should support requests from Perl clients', function(done) {
var perlTest = create_client_test('GET', 'perl client.pl', 'test/clients/perl', 'perl-test-key')
perlTest(done);
});

// Mac-specific client tests
if(os.platform() === "darwin") {
it ('should support requests from golang', function(done) {
it ('should support requests from Go clients', function(done) {
var golangTest = create_client_test('GET', './client', 'test/clients/golang/bin/mac', 'golang-test-key')
golangTest(done);
});
}

// Linux-specific client tests
if(os.platform() === "linux") {
it ('should support requests from golang', function(done) {
it ('should support requests from Go clients', function(done) {
var golangTest = create_client_test('GET', './client', 'test/clients/golang/bin/linux', 'golang-test-key')
golangTest(done);
});
}

// Windows-specific client tests
if (os.platform().indexOf('win') === 0) {
it ('Powershell', function(done) {
it ('should support requests from Powershell clients', function(done) {
// For some reason, Powershell only runs cleanly with spawn, not with the simpler exec semantics used
// in other tests.
var spawn = require("child_process").spawn,child;
Expand All @@ -91,31 +91,31 @@ describe('Client library tests', function() {
child.stdin.end();
});

it ('DotNetOpenAuth', function(done) {
it ('should support requests from .Net clients using DotNetOpenAuth', function(done) {
var dotNetTest = create_client_test('POST', 'Auspice\\Client\\bin\\Release\\Client.exe',
'test/clients/dotnet', 'dotnet-test-key');
dotNetTest(done);
});

it ('RestSharp', function(done) {
it ('should support requests from .Net clients using RestSharp', function(done) {
var restsharpTest = create_client_test('POST', 'Auspice\\RestSharpClient\\bin\\Release\\RestSharpClient.exe',
'test/clients/dotnet', 'restsharp-test-key');
restsharpTest(done);
});

it ('golang', function(done) {
it ('should support requests from Go clients', function(done) {
var golangTest = create_client_test('GET', 'client.exe', 'test\\clients\\golang\\bin\\windows', 'golang-test-key')
golangTest(done);
});
}
// If it's not a Windows machine, run these tests.
else {
it ('should support requests from bash', function(done) {
it ('should support requests from bash clients', function(done) {
var bashTest = create_client_test('GET', 'bash client.sh', 'test/clients/bash', 'bash-test-key')
bashTest(done);
});

it ('should support requests from python', function(done) {
it ('should support requests from python clients', function(done) {
var pythonTest = create_client_test('GET', 'python client.py', 'test/clients/python', 'python-test-key')
pythonTest(done);
});
Expand Down

0 comments on commit eb1b336

Please sign in to comment.