<commit_before>require( "./setup" );
var docker = require( "../src/docker" )( false );
var adapter = require( "../src/adapter" )( docker );

describe( "Adapter", function() {

  describe( "login", function() {
    it( "should fail to login with invalid credentials", function() {
      this.timeout( 8000 );
      return docker.login( "testuser", "<PASSWORD>", "localhost:5080" )
        .should.be.rejectedWith( Error, "docker command \'login\', failed with\n Error response from daemon: login attempt to http://localhost:5080/v2/ failed with status: 401 Unauthorized\n" );
    } );

    it( "should login successfully with valid credentials", function() {
      this.timeout( 8000 );
      return adapter.login( "testuser", "<PASSWORD>", "localhost:5080" )
        .should.be.fulfilled;
    } );
  } );

  describe( "build", function() {
    it( "should build image", function() {
      this.timeout( 20000 );
      return adapter.build( "./spec", "test-image", "Dockerfile.test" )
        .should.be.fulfilled;
    } );
  } );

  describe( "explicit tag", function() {
    it( "should tag the docker image", function() {
      return adapter.tag( { _: [ "tag", "alpine:3.4" ], tag: "3.4_custom" } )
        .should.be.fulfilled;
    } );

    after( function() {
      return docker.removeImage( "alpine:3.4_custom" );
    } );
  } );

  describe( "abbreviated tag", function() {
    it( "should tag the docker image", function() {
      return adapter.tag( { _: [ "tag", "alpine:3.4" ], t: "3.4_custom" } )<commit_msg>fix(test): correct build api call<commit_after>require( "./setup" );
var docker = require( "../src/docker" )( false );
var adapter = require( "../src/adapter" )( docker );

describe( "Adapter", function() {

  describe( "login", function() {
    it( "should fail to login with invalid credentials", function() {
      this.timeout( 8000 );
      return docker.login( "testuser", "<PASSWORD>", "localhost:5080" )
        .should.be.rejectedWith( Error, "docker command \'login\', failed with\n Error response from daemon: login attempt to http://localhost:5080/v2/ failed with status: 401 Unauthorized\n" );
    } );

    it( "should login successfully with valid credentials", function() {
      this.timeout( 8000 );
      return adapter.login( "testuser", "testpass", "localhost:5080" )
        .should.be.fulfilled;
    } );
  } );

  describe( "build", function() {
    it( "should build image", function() {
      this.timeout( 20000 );
      return adapter.build( "test-image", "./spec", "Dockerfile.test" )
        .should.be.fulfilled;
    } );
  } );

  describe( "explicit tag", function() {
    it( "should tag the docker image", function() {
      return adapter.tag( { _: [ "tag", "alpine:3.4" ], tag: "3.4_custom" } )
        .should.be.fulfilled;
    } );

    after( function() {
      return docker.removeImage( "alpine:3.4_custom" );
    } );
  } );

  describe( "abbreviated tag", function() {
    it( "should tag the docker image", function() {
      return adapter.tag( { _: [ "tag", "alpine:3.4" ], t: "3.4_custom" } )
{'fraction_non_alphanumeric': 0.17733507511430438, 'fraction_numerical': 0.025473546701502287, 'mean_word_length': 3.0249671484888303, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6160322', 'n_tokens_mistral': 1034, 'n_tokens_neox': 951, 'n_words': 256}