Repository: newrelic/node-newrelic (js)

Issue:
Finish extracting secrets based tests to smoke tests
## Is your feature request related to a problem? Please describe.

Currently, we have some checks in our integration tests for secrets being available. Ones deemed valuable for full round-trip should be moved to the smoke-test CI. These integration tests are only run on merges to main when the secrets are available but not on forks.

* Any functional testing still needed for these areas should be converted to not require secrets.
* Actual full round trips needed migrated to be smoke tests only ran on main repo.


Pull request:
moved all secrets based tests to smoke folder, updated npm scripts to…
… properly run new smoke tests, and removed a few unused bin bash scripts

<!--
Thank you for submitting a Pull Request.

This code is leveraged to monitor critical services. Please consider the following:
* Tests are required.
* Performance matters.
* Features that are specific to just your app are unlikely to make it in.

Please fill out the relevant sections as follows:
* Proposed Release Notes: Bulleted list of recommended release notes for the change(s).
* Links: Any relevant links for the change.
* Details: In-depth description of changes, other technical notes, etc.
-->

## Proposed Release Notes
 * Moved all integration tests that required secrets to the smoke folder

## Links
Closes #626 

## Details
This PR also removed some unused scripts in bin once more smoke tests were added.  Also, I removed running `npm ci` in `prepare-test` script because all the corresponding CI jobs already did this.  To test this locally, you must have the following env vars exported:

```
export TEST_LICENSE=<see last pass shared note>
export LASP_LICENSE=<see last pass shared note>
export LASP_SECURE_LICENSE=<see last pass shared note>
```

Then just run
```
npm ci
npm run smoke
```

<img width="582" alt="screenshot 2021-06-14 at 5 30 47 PM" src="https://user-images.githubusercontent.com/1874937/121962094-42f1c100-cd36-11eb-9b5f-3fe1a4324d94.png">


Patch:
diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml
index d8d5ded5f..d8c2dc071 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -58,12 +58,6 @@ jobs:
       run: npm run services
     - name: Run Integration Tests
       run: npm run integration
-      env:
-        TEST_LICENSE: ${{ secrets.TEST_LICENSE }}
-        COLLECTOR_LICENSE: ${{ secrets.COLLECTOR_LICENSE }}
-        LASP_LICENSE: ${{ secrets.LASP_LICENSE }}
-        LASP_SECURE_LICENSE: ${{ secrets.LASP_SECURE_LICENSE }}
-        FORCE_RUN_TESTS_WITH_SECRETS: ${{ github.repository_owner == 'newrelic' && github.event_name == 'push' }}
 
   versioned:
     runs-on: ubuntu-latest
diff --git a/bin/clean.sh b/bin/clean.sh
deleted file mode 100755
index 7a145e9c4..000000000
--- a/bin/clean.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-
-# Copyright 2020 New Relic Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0
-
-SSLKEY="test/lib/test-key.key"
-CACERT="test/lib/ca-certificate.crt"
-CAINDEX="test/lib/ca-index"
-CASERIAL="test/lib/ca-serial"
-CERTIFICATE="test/lib/self-signed-test-certificate.crt"
-
-find . -depth -type d -name node_modules -print0 | xargs -0 rm -rf
-find . -name newrelic_agent.log -print0 | xargs -0 rm -rf
-rm -rf npm-debug.log newrelic_agent.log .coverage_data cover_html
-rm -rf $SSLKEY $CACERT $CAINDEX $CASERIAL $CERTIFICATE
-rm -rf test/lib/*.old test/lib/*.attr
-rm -rf docs/
\ No newline at end of file
diff --git a/bin/smoke.sh b/bin/smoke.sh
deleted file mode 100755
index a80724734..000000000
--- a/bin/smoke.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh
-
-# Copyright 2020 New Relic Corporation. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0
-
-npm install --production --loglevel warn --no-package-lock
-npm --prefix test/smoke install --no-package-lock
-time node test/smoke/*.tap.js
\ No newline at end of file
diff --git a/package.json b/package.json
index 37922abba..5a4012029 100644
--- a/package.json
+++ b/package.json
@@ -120,16 +120,15 @@
   "scripts": {
     "bench": "node ./bin/run-bench.js",
     "ca-gen": "./bin/update-ca-bundle.sh",
-    "clean": "./bin/clean.sh",
     "docker-env": "./bin/docker-env-vars.sh",
     "docs": "npm ci && jsdoc -c ./jsdoc-conf.json --private -r .",
     "integration": "npm run prepare-test && npm run sub-install && time tap --no-esm test/integration/**/**/*.tap.js --timeout=180 --no-coverage",
-    "prepare-test": "npm ci && npm run ca-gen && npm run ssl && npm run docker-env",
+    "prepare-test": "npm run ca-gen && npm run ssl && npm run docker-env",
     "lint": "eslint ./*.js lib test bin",
     "public-docs": "npm ci && jsdoc -c ./jsdoc-conf.json --tutorials examples/shim api.js lib/shim/ lib/transaction/handle.js && cp examples/shim/*.png out/",
     "publish-docs": "./bin/publish-docs.sh",
     "services": "./bin/docker-services.sh",
-    "smoke": "npm run clean && ./bin/smoke.sh",
+    "smoke": "npm run ssl && time tap test/smoke/**/**/*.tap.js --timeout=180 --no-coverage",
     "ssl": "./bin/ssl.sh",
     "sub-install": "node test/bin/install_sub_deps",
     "test": "npm run integration && npm run unit",


Test patch:
diff --git a/.github/workflows/smoke-test-workflow.yml b/.github/workflows/smoke-test-workflow.yml
index 2513c5b42..800703938 100644
--- a/.github/workflows/smoke-test-workflow.yml
+++ b/.github/workflows/smoke-test-workflow.yml
@@ -24,8 +24,11 @@ jobs:
       uses: actions/setup-node@v1
       with:
         node-version: ${{ matrix.node-version }}
-    # Smoke tests do own install
+    - name: Install Dependencies
+      run: npm ci
     - name: Run Smoke Tests
       run: npm run smoke
       env:
         TEST_LICENSE: ${{ secrets.TEST_LICENSE }}
+        LASP_LICENSE: ${{ secrets.LASP_LICENSE }}
+        LASP_SECURE_LICENSE: ${{ secrets.LASP_SECURE_LICENSE }}
diff --git a/test/helpers/secrets.js b/test/helpers/secrets.js
index d2fe46992..3b12bc301 100644
--- a/test/helpers/secrets.js
+++ b/test/helpers/secrets.js
@@ -13,22 +13,6 @@ function getTestSecret(secretName) {
   return envVar.trim()
 }
 
-/**
- * Checks whether any of the secrets needed by the test are missing or if the
- * FORCE_RUN_TESTS_WITH_SECRETS env var is set. This is set by the github
- * actions workflow when tests are being run on the newrelic repository where
- * secrets should be available. In this case, even if the license key that a
- * test is looking for is not present, run the test anyway and let it fail,
- * because it should be present on the newrelic repo.
- */
-function shouldSkipTest(...secrets) {
-  const missing = secrets.some(s => !s)  // !s catches empty strings
-  const forceTestRun = process.env.FORCE_RUN_TESTS_WITH_SECRETS === 'true'
-  const shouldRun = forceTestRun || !missing
-  return !shouldRun
-}
-
 module.exports = {
-  getTestSecret,
-  shouldSkipTest
+  getTestSecret
 }
diff --git a/test/integration/agent/start-stop.tap.js b/test/integration/agent/start-stop.tap.js
index 7cb0fc5f2..3a2fe671e 100644
--- a/test/integration/agent/start-stop.tap.js
+++ b/test/integration/agent/start-stop.tap.js
@@ -8,44 +8,6 @@
 const tap = require('tap')
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
-
-
-const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('Collector API should connect to staging-collector.newrelic.com', {skip}, (t) => {
-  const config = configurator.initialize({
-    app_name: 'node.js Tests',
-    license_key: license,
-    host: 'staging-collector.newrelic.com',
-    port: 443,
-    ssl: true,
-    utilization: {
-      detect_aws: false,
-      detect_pcf: false,
-      detect_gcp: false,
-      detect_docker: false
-    },
-    logging: {
-      level: 'trace'
-    }
-  })
-  const agent = new Agent(config)
-
-  agent.start((error, returned) => {
-    t.notOk(error, 'connected without error')
-    t.ok(returned, 'got boot configuration')
-    t.ok(returned.agent_run_id, 'got run ID')
-    t.ok(agent.config.run_id, 'run ID set in configuration')
-
-    agent.stop((error) => {
-      t.notOk(error, 'should have shut down without issue')
-      t.notOk(agent.config.run_id, 'run ID should have been cleared by shutdown')
-
-      t.end()
-    })
-  })
-})
 
 tap.test('Agent should not connect to collector in serverless mode', (t) => {
   const config = configurator.initialize({
diff --git a/test/integration/newrelic.js b/test/integration/newrelic.js
deleted file mode 100644
index e115f62f2..000000000
--- a/test/integration/newrelic.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2020 New Relic Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-'use strict'
-
-exports.config = {
-  app_name           : ['My Application'],
-  license_key        : 'license key here',
-  logging            : {
-    level : 'trace',
-    filepath : '../../newrelic_agent.log'
-  },
-  utilization: {
-    detect_aws: false,
-    detect_pcf: false,
-    detect_azure: false,
-    detect_gcp: false,
-    detect_docker: false
-  },
-  transaction_tracer : {
-    enabled : true
-  },
-  feature_flag: {
-    await_support: false,
-    express5: true
-  }
-}
diff --git a/test/integration/agent/agent-restart-listener.tap.js b/test/smoke/agent/agent-restart-listener.tap.js
similarity index 93%
rename from test/integration/agent/agent-restart-listener.tap.js
rename to test/smoke/agent/agent-restart-listener.tap.js
index 8a9f99820..1e26f2751 100644
--- a/test/integration/agent/agent-restart-listener.tap.js
+++ b/test/smoke/agent/agent-restart-listener.tap.js
@@ -8,12 +8,11 @@
 const tap = require('tap')
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const {getTestSecret} = require('../../helpers/secrets')
 
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('Collector API should connect to staging-collector.newrelic.com', {skip}, (t) => {
+tap.test('Collector API should connect to staging-collector.newrelic.com', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: license,
diff --git a/test/integration/agent/lasp-send-trace.tap.js b/test/smoke/agent/lasp-send-trace.tap.js
similarity index 95%
rename from test/integration/agent/lasp-send-trace.tap.js
rename to test/smoke/agent/lasp-send-trace.tap.js
index 2d495ec20..412172d28 100644
--- a/test/integration/agent/lasp-send-trace.tap.js
+++ b/test/smoke/agent/lasp-send-trace.tap.js
@@ -9,12 +9,10 @@ const tap = require('tap')
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
 const API = require('../../../api')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
-
-
+const {getTestSecret} = require('../../helpers/secrets')
 const license = getTestSecret('LASP_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('LASP-enabled agent', {skip}, (t) => {
+
+tap.test('LASP-enabled agent', (t) => {
   let agent = null
   let api = null
   let config = null
diff --git a/test/smoke/agent/start-stop.tap.js b/test/smoke/agent/start-stop.tap.js
new file mode 100644
index 000000000..6281a6c78
--- /dev/null
+++ b/test/smoke/agent/start-stop.tap.js
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2020 New Relic Corporation. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+'use strict'
+
+const tap = require('tap')
+const configurator = require('../../../lib/config')
+const Agent = require('../../../lib/agent')
+const {getTestSecret} = require('../../helpers/secrets')
+
+
+const license = getTestSecret('TEST_LICENSE')
+tap.test('Collector API should connect to staging-collector.newrelic.com', (t) => {
+  const config = configurator.initialize({
+    app_name: 'node.js Tests',
+    license_key: license,
+    host: 'staging-collector.newrelic.com',
+    port: 443,
+    ssl: true,
+    utilization: {
+      detect_aws: false,
+      detect_pcf: false,
+      detect_gcp: false,
+      detect_docker: false
+    },
+    logging: {
+      level: 'trace'
+    }
+  })
+  const agent = new Agent(config)
+
+  agent.start((error, returned) => {
+    t.notOk(error, 'connected without error')
+    t.ok(returned, 'got boot configuration')
+    t.ok(returned.agent_run_id, 'got run ID')
+    t.ok(agent.config.run_id, 'run ID set in configuration')
+
+    agent.stop((error) => {
+      t.notOk(error, 'should have shut down without issue')
+      t.notOk(agent.config.run_id, 'run ID should have been cleared by shutdown')
+
+      t.end()
+    })
+  })
+})
diff --git a/test/integration/api/connection.tap.js b/test/smoke/api/connection.tap.js
similarity index 90%
rename from test/integration/api/connection.tap.js
rename to test/smoke/api/connection.tap.js
index 38a1ca0eb..158fd007f 100644
--- a/test/integration/api/connection.tap.js
+++ b/test/smoke/api/connection.tap.js
@@ -8,11 +8,10 @@
 const tap = require('tap')
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const {getTestSecret} = require('../../helpers/secrets')
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('Collector API should connect to staging-collector.newrelic.com', {skip}, (t) => {
+tap.test('Collector API should connect to staging-collector.newrelic.com', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: license,
diff --git a/test/integration/api/error-data.tap.js b/test/smoke/api/error-data.tap.js
similarity index 91%
rename from test/integration/api/error-data.tap.js
rename to test/smoke/api/error-data.tap.js
index a7b064dbb..7fd9f47f8 100644
--- a/test/integration/api/error-data.tap.js
+++ b/test/smoke/api/error-data.tap.js
@@ -8,12 +8,11 @@
 const test = require('tap').test
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const {getTestSecret} = require('../../helpers/secrets')
 
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-test('Collector API should send errors to staging-collector.newrelic.com', {skip}, (t) => {
+test('Collector API should send errors to staging-collector.newrelic.com', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: license,
diff --git a/test/integration/api/metric-data.tap.js b/test/smoke/api/metric-data.tap.js
similarity index 88%
rename from test/integration/api/metric-data.tap.js
rename to test/smoke/api/metric-data.tap.js
index b7680fd82..34119556d 100644
--- a/test/integration/api/metric-data.tap.js
+++ b/test/smoke/api/metric-data.tap.js
@@ -9,12 +9,11 @@ const test = require('tap').test
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
 const CollectorAPI = require('../../../lib/collector/api')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const {getTestSecret} = require('../../helpers/secrets')
 
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-test('Collector API should send metrics to staging-collector.newrelic.com', {skip}, (t) => {
+test('Collector API should send metrics to staging-collector.newrelic.com', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: license,
@@ -57,7 +56,7 @@ test('Collector API should send metrics to staging-collector.newrelic.com', {ski
       t.notOk(error, 'sent metrics without error')
       t.ok(command, 'got a response')
 
-      t.deepEqual(command, {retainData: false})
+      t.same(command, {retainData: false})
 
       t.end()
     })
diff --git a/test/integration/api/transaction-sample-data.tap.js b/test/smoke/api/transaction-sample-data.tap.js
similarity index 86%
rename from test/integration/api/transaction-sample-data.tap.js
rename to test/smoke/api/transaction-sample-data.tap.js
index ff9da750d..5c708d725 100644
--- a/test/integration/api/transaction-sample-data.tap.js
+++ b/test/smoke/api/transaction-sample-data.tap.js
@@ -8,15 +8,15 @@
 const tap = require('tap')
 const configurator = require('../../../lib/config')
 const Agent = require('../../../lib/agent')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const {getTestSecret} = require('../../helpers/secrets')
 
 
-const license = getTestSecret('COLLECTOR_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('Collector API should send errors to newrelic.com', {skip}, (t) => {
+const license = getTestSecret('TEST_LICENSE')
+tap.test('Collector API should send transaction traces to staging-collector.newrelic.com', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: license,
+    host: 'staging-collector.newrelic.com',
     port: 443,
     ssl: true,
     utilization: {
diff --git a/test/smoke/e2e/README.md b/test/smoke/e2e/README.md
new file mode 100644
index 000000000..df14012de
--- /dev/null
+++ b/test/smoke/e2e/README.md
@@ -0,0 +1,2 @@
+This folder contains a very basic Express server that is instrumented with the Node.js agent.  It will run a test suite that just makes a http requests and verifies
+that it does not crash the server and properly responds.
diff --git a/test/smoke/express-server.js b/test/smoke/e2e/express-server.js
similarity index 85%
rename from test/smoke/express-server.js
rename to test/smoke/e2e/express-server.js
index 9320cc5ed..eaafdc32b 100644
--- a/test/smoke/express-server.js
+++ b/test/smoke/e2e/express-server.js
@@ -5,7 +5,7 @@
 
 'use strict'
 
-require('../../index') // same as require('newrelic')
+require('../../../index') // same as require('newrelic')
 const express = require('express')
 
 const app = express()
diff --git a/test/smoke/e2e/express.tap.js b/test/smoke/e2e/express.tap.js
new file mode 100644
index 000000000..873fe2ab9
--- /dev/null
+++ b/test/smoke/e2e/express.tap.js
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2020 New Relic Corporation. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+'use strict'
+
+const cp = require('child_process')
+const http = require('http')
+const path = require('path')
+const util = require('util')
+const tap = require('tap')
+
+const EXIT_TYPES = ['error', 'exit', 'disconnect', 'close']
+const exitHandlers = {}
+
+tap.test('Express e2e request smoke test', (t) => {
+  const server = cp.fork(path.join(__dirname, 'express-server'))
+
+  // Bind to the various ways failure could happen
+  EXIT_TYPES.forEach((type) => {
+    exitHandlers[type] = unexpectedClose.bind(null, type)
+    server.on(type, exitHandlers[type])
+  })
+
+  server.on('message', function incommingMessage(port) {
+    const options = {
+      hostname: 'localhost',
+      port: port,
+      path: '/',
+      method: 'GET'
+    }
+
+    let data = ''
+    http.get(options, function handleResponse(res) {
+      res.setEncoding('utf8')
+
+      res.on('data', function onData(chunk) {
+        data += chunk
+      })
+
+      res.on('end', function onEnd() {
+        t.equal(data, 'hello world!', 'should return appropriate response data')
+        // unbind from the exit conditions
+        EXIT_TYPES.forEach((type) => {
+          server.removeListener(type, exitHandlers[type])
+        })
+        server.kill()
+        t.end()
+      })
+    })
+  })
+
+  function unexpectedClose(type) {
+    throw new Error(util.format('child process unexpectedly closed: %s', type))
+  }
+})
+
diff --git a/test/smoke/e2e/newrelic.js b/test/smoke/e2e/newrelic.js
new file mode 100644
index 000000000..77cd1c1bf
--- /dev/null
+++ b/test/smoke/e2e/newrelic.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2020 New Relic Corporation. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+'use strict'
+
+/**
+ * New Relic agent configuration.
+ *
+ * See lib/config/default.js in the agent distribution for a more complete
+ * description of configuration variables and their potential values.
+ */
+exports.config = {
+  /**
+   * Array of application names.
+   */
+  app_name: ['express smoke test'],
+  /**
+   * Your New Relic license key.
+   */
+  license_key: process.env.TEST_LICENSE,
+  logging: {
+    /**
+     * Level at which to log. 'trace' is most useful to New Relic when diagnosing
+     * issues with the agent, 'info' and higher will impose the least overhead on
+     * production applications.
+     */
+    level: 'info'
+  },
+  host: 'staging-collector.newrelic.com'
+}
diff --git a/test/smoke/express.tap.js b/test/smoke/express.tap.js
deleted file mode 100644
index 07990b902..000000000
--- a/test/smoke/express.tap.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2020 New Relic Corporation. All rights reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-'use strict'
-
-const cp = require('child_process')
-const http = require('http')
-const path = require('path')
-const util = require('util')
-
-const assert = require('chai').assert
-
-const EXIT_TYPES = ['error', 'exit', 'disconnect', 'close']
-const exitHandlers = {}
-let gotResponse = false
-
-const server = cp.fork(path.join(__dirname, 'express-server'))
-
-// Bind to the various ways failure could happen
-EXIT_TYPES.forEach((type) => {
-  exitHandlers[type] = unexpectedClose.bind(null, type)
-  server.on(type, exitHandlers[type])
-})
-
-server.on('message', function incommingMessage(port) {
-  const options = {
-    hostname: 'localhost',
-    port: port,
-    path: '/',
-    method: 'GET'
-  }
-
-  let data = ''
-  http.get(options, function handleResponse(res) {
-    res.setEncoding('utf8')
-
-    res.on('data', function onData(chunk) {
-      data += chunk
-    })
-
-    res.on('end', function onEnd() {
-      assert.equal(data, 'hello world!')
-      // unbind from the exit conditions
-      EXIT_TYPES.forEach((type) => {
-        server.removeListener(type, exitHandlers[type])
-      })
-      server.kill()
-      gotResponse = true
-    })
-  })
-})
-
-process.on('exit', function onExit() {
-  assert(gotResponse)
-})
-
-function unexpectedClose(type) {
-  throw new Error(util.format('child process unexpectedly closed: %s', type))
-}
diff --git a/test/integration/index/index-bad-version.tap.js b/test/smoke/index/index-bad-version.tap.js
similarity index 91%
rename from test/integration/index/index-bad-version.tap.js
rename to test/smoke/index/index-bad-version.tap.js
index cb688f38b..f8ce9d3a5 100644
--- a/test/integration/index/index-bad-version.tap.js
+++ b/test/smoke/index/index-bad-version.tap.js
@@ -6,12 +6,11 @@
 'use strict'
 
 const tap = require('tap')
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const {getTestSecret} = require('../../helpers/secrets')
 
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('loading the agent with a bad version', {timeout: 20000, skip}, (t) => {
+tap.test('loading the agent with a bad version', {timeout: 20000}, (t) => {
   let agent = null
 
   process.env.NEW_RELIC_HOME = __dirname + '/..'
diff --git a/test/integration/index/index.tap.js b/test/smoke/index/index.tap.js
similarity index 86%
rename from test/integration/index/index.tap.js
rename to test/smoke/index/index.tap.js
index 52bcf1f61..e2bdaa0ac 100644
--- a/test/integration/index/index.tap.js
+++ b/test/smoke/index/index.tap.js
@@ -5,12 +5,11 @@
 
 'use strict'
 
-const test = require('tap').test
-const {getTestSecret, shouldSkipTest} = require('../../helpers/secrets')
+const { test } = require('tap')
+const { getTestSecret } = require('../../helpers/secrets')
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-test('loading the application via index.js', {timeout: 15000, skip}, (t) => {
+test('loading the application via index.js', {timeout: 15000}, (t) => {
   let agent = null
 
   process.env.NEW_RELIC_HOME = __dirname + '/..'
diff --git a/test/integration/lasp_connect.tap.js b/test/smoke/lasp_connect.tap.js
similarity index 85%
rename from test/integration/lasp_connect.tap.js
rename to test/smoke/lasp_connect.tap.js
index b422a1497..12ddddafa 100644
--- a/test/integration/lasp_connect.tap.js
+++ b/test/smoke/lasp_connect.tap.js
@@ -9,12 +9,11 @@ const tap = require('tap')
 const configurator = require('../../lib/config')
 const Agent = require('../../lib/agent')
 const CollectorAPI = require('../../lib/collector/api')
-const { getTestSecret, shouldSkipTest } = require('../helpers/secrets')
+const { getTestSecret} = require('../helpers/secrets')
+const lasp_license = getTestSecret('LASP_LICENSE')
+const lasp_secure_license = getTestSecret('LASP_SECURE_LICENSE')
 
-
-let lasp_license = getTestSecret('LASP_LICENSE')
-let skip = shouldSkipTest(lasp_license)
-tap.test('connecting with a LASP token should not error', {skip}, (t) => {
+tap.test('connecting with a LASP token should not error', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: lasp_license,
@@ -50,9 +49,7 @@ tap.test('connecting with a LASP token should not error', {skip}, (t) => {
   })
 })
 
-let lasp_secure_license = getTestSecret('LASP_SECURE_LICENSE')
-skip = shouldSkipTest(lasp_secure_license)
-tap.test('missing required policies should result in shutdown', {skip}, (t) => {
+tap.test('missing required policies should result in shutdown', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: lasp_secure_license,
diff --git a/test/smoke/newrelic.js b/test/smoke/newrelic.js
index 77cd1c1bf..e115f62f2 100644
--- a/test/smoke/newrelic.js
+++ b/test/smoke/newrelic.js
@@ -5,28 +5,25 @@
 
 'use strict'
 
-/**
- * New Relic agent configuration.
- *
- * See lib/config/default.js in the agent distribution for a more complete
- * description of configuration variables and their potential values.
- */
 exports.config = {
-  /**
-   * Array of application names.
-   */
-  app_name: ['express smoke test'],
-  /**
-   * Your New Relic license key.
-   */
-  license_key: process.env.TEST_LICENSE,
-  logging: {
-    /**
-     * Level at which to log. 'trace' is most useful to New Relic when diagnosing
-     * issues with the agent, 'info' and higher will impose the least overhead on
-     * production applications.
-     */
-    level: 'info'
+  app_name           : ['My Application'],
+  license_key        : 'license key here',
+  logging            : {
+    level : 'trace',
+    filepath : '../../newrelic_agent.log'
+  },
+  utilization: {
+    detect_aws: false,
+    detect_pcf: false,
+    detect_azure: false,
+    detect_gcp: false,
+    detect_docker: false
+  },
+  transaction_tracer : {
+    enabled : true
   },
-  host: 'staging-collector.newrelic.com'
+  feature_flag: {
+    await_support: false,
+    express5: true
+  }
 }
diff --git a/test/smoke/package.json b/test/smoke/package.json
deleted file mode 100644
index 78032f34f..000000000
--- a/test/smoke/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "name": "express-smoke",
-  "version": "0.0.0",
-  "description": "smoke test for express",
-  "main": "express.tap.js",
-  "scripts": {
-    "test": "node ./express.tap.js"
-  },
-  "author": "Wraithan <wraithan@newrelic.com>",
-  "license": "UNLICENSED",
-  "dependencies": {
-    "express": "^4.6.0"
-  },
-  "devDependencies": {
-    "chai": "^1"
-  },
-  "private": true
-}
diff --git a/test/integration/proxy-api-connection-auth.tap.js b/test/smoke/proxy-api-connection-auth.tap.js
similarity index 87%
rename from test/integration/proxy-api-connection-auth.tap.js
rename to test/smoke/proxy-api-connection-auth.tap.js
index d535131ae..27fea040f 100644
--- a/test/integration/proxy-api-connection-auth.tap.js
+++ b/test/smoke/proxy-api-connection-auth.tap.js
@@ -10,10 +10,10 @@ const tap = require('tap')
 const configurator = require('../../lib/config')
 const Agent = require('../../lib/agent')
 const CollectorAPI = require('../../lib/collector/api')
+const {getTestSecret} = require('../helpers/secrets')
+const license = getTestSecret('TEST_LICENSE')
 
-
-const skip = !process.env.TEST_LICENSE
-tap.test('proxy authentication should set headers', {skip}, (t) => {
+tap.test('proxy authentication should set headers', (t) => {
   t.plan(2)
 
   const server = net.createServer()
@@ -32,7 +32,7 @@ tap.test('proxy authentication should set headers', {skip}, (t) => {
     const port = server.address().port
     const config = configurator.initialize({
       app_name: 'node.js Tests',
-      license_key: process.env.TEST_LICENSE,
+      license_key: license,
       host: 'staging-collector.newrelic.com',
       port: 443,
       proxy: `http://a:b@localhost:${port}`,
diff --git a/test/integration/proxy-api-connection-noproxy.tap.js b/test/smoke/proxy-api-connection-noproxy.tap.js
similarity index 87%
rename from test/integration/proxy-api-connection-noproxy.tap.js
rename to test/smoke/proxy-api-connection-noproxy.tap.js
index cafbbc10e..a6bb2f104 100644
--- a/test/integration/proxy-api-connection-noproxy.tap.js
+++ b/test/smoke/proxy-api-connection-noproxy.tap.js
@@ -9,12 +9,11 @@ const tap = require('tap')
 const configurator = require('../../lib/config')
 const Agent = require('../../lib/agent')
 const CollectorAPI = require('../../lib/collector/api')
-const {getTestSecret, shouldSkipTest} = require('../helpers/secrets')
+const {getTestSecret} = require('../helpers/secrets')
 
 
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
-tap.test('no proxy set should not use proxy agent', {skip}, (t) => {
+tap.test('no proxy set should not use proxy agent', (t) => {
   const config = configurator.initialize({
     app_name: 'node.js Tests',
     license_key: license,
diff --git a/test/integration/proxy-api-connection-port.tap.js b/test/smoke/proxy-api-connection-port.tap.js
similarity index 91%
rename from test/integration/proxy-api-connection-port.tap.js
rename to test/smoke/proxy-api-connection-port.tap.js
index ec8677df3..770469d8f 100644
--- a/test/integration/proxy-api-connection-port.tap.js
+++ b/test/smoke/proxy-api-connection-port.tap.js
@@ -13,7 +13,7 @@ const read = require('fs').readFileSync
 const configurator = require('../../lib/config')
 const Agent = require('../../lib/agent')
 const CollectorAPI = require('../../lib/collector/api')
-const {getTestSecret, shouldSkipTest} = require('../helpers/secrets')
+const {getTestSecret} = require('../helpers/secrets')
 const { SSL_HOST } = require('../lib/agent_helper')
 
 let port = 0
@@ -22,9 +22,8 @@ const SSL_CONFIG = {
   cert: read(join(__dirname, '../lib/self-signed-test-certificate.crt')),
 }
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
 
-tap.test('setting proxy_port should use the proxy agent', {skip}, (t) => {
+tap.test('setting proxy_port should use the proxy agent', (t) => {
   const server = proxySetup(https.createServer(SSL_CONFIG))
 
   server.listen(0, () => {
diff --git a/test/integration/proxy-api-connection-ssl.tap.js b/test/smoke/proxy-api-connection-ssl.tap.js
similarity index 92%
rename from test/integration/proxy-api-connection-ssl.tap.js
rename to test/smoke/proxy-api-connection-ssl.tap.js
index 12f7abf12..4434c12a7 100644
--- a/test/integration/proxy-api-connection-ssl.tap.js
+++ b/test/smoke/proxy-api-connection-ssl.tap.js
@@ -13,7 +13,7 @@ const read = require('fs').readFileSync
 const configurator = require('../../lib/config')
 const Agent = require('../../lib/agent')
 const CollectorAPI = require('../../lib/collector/api')
-const {getTestSecret, shouldSkipTest} = require('../helpers/secrets')
+const {getTestSecret} = require('../helpers/secrets')
 const { SSL_HOST } = require('../lib/agent_helper')
 
 let port = 0
@@ -22,9 +22,8 @@ const SSL_CONFIG = {
   cert: read(join(__dirname, '../lib/self-signed-test-certificate.crt')),
 }
 const license = getTestSecret('TEST_LICENSE')
-const skip = shouldSkipTest(license)
 
-tap.test('support ssl to the proxy', {skip}, (t) => {
+tap.test('support ssl to the proxy', (t) => {
   const server = proxySetup(https.createServer(SSL_CONFIG))
 
   server.listen(0, () => {