Skip to content

Commit

Permalink
Drop old Node.js versions (#178)
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina authored Oct 17, 2023
1 parent 52bb803 commit c1898b1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
contents: read
strategy:
matrix:
node-version: [14, 16, 18]
node-version: [18, 20]
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion test/acceptance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ecsFormat = require('@elastic/ecs-pino-format')
const index = 'pinotest'
const streamIndex = 'logs-pino-test'
const type = 'log'
const node = 'http://localhost:9200'
const node = 'http://127.0.0.1:9200'
const timeout = 5000
const auth = {
apiKey: process.env.ELASTICSEARCH_API_KEY,
Expand Down
2 changes: 1 addition & 1 deletion test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ test('CLI: if arg.read-config is set, should read the config file and passed the
'./lib.js': (opts) => {
t.same(opts, {
index: 'custom-index',
node: 'https://localhost:9200',
node: 'https://127.0.0.1:9200',
rejectUnauthorized: false,
auth: {
username: 'elastic',
Expand Down
2 changes: 1 addition & 1 deletion test/exampleConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
index: 'custom-index',
node: 'https://localhost:9200',
node: 'https://127.0.0.1:9200',
rejectUnauthorized: false,
username: 'elastic',
password: 'pass'
Expand Down
14 changes: 7 additions & 7 deletions test/unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const matchISOString = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0
const options = {
index: 'pinotest',
type: 'log',
node: 'http://localhost:9200'
node: 'http://127.0.0.1:9200'
}

const dsOptions = {
Expand Down Expand Up @@ -102,7 +102,7 @@ test('Uses the type parameter only with ES < 7 / 1', (t) => {
log.info(['info'], prettyLog)
})

test('Uses the type parameter only with ES < 7 / 1, even with the deprecated `es-version` option', (t) => {
test('Uses the type parameter only with ES < 7 / 1, even with the deprecated `esVersion` option', (t) => {
t.plan(2)

const Client = function (config) {
Expand All @@ -122,7 +122,7 @@ test('Uses the type parameter only with ES < 7 / 1, even with the deprecated `es
const elastic = proxyquire('../', {
'@elastic/elasticsearch': { Client }
})
const instance = elastic(Object.assign(options, { 'es-version': 6 }))
const instance = elastic(Object.assign(options, { esVersion: 6 }))
const log = pino(instance)
const prettyLog = `some logs goes here.
another log...`
Expand Down Expand Up @@ -155,7 +155,7 @@ test('Uses the type parameter only with ES < 7 / 2', (t) => {
log.info(['info'], prettyLog)
})

test('Uses the type parameter only with ES < 7 / 2, even with the deprecate `es-version` option', (t) => {
test('Uses the type parameter only with ES < 7 / 2, even with the deprecate `esVersion` option', (t) => {
t.plan(2)
const Client = function (config) {
t.equal(config.node, options.node)
Expand All @@ -173,7 +173,7 @@ test('Uses the type parameter only with ES < 7 / 2, even with the deprecate `es-
const elastic = proxyquire('../', {
'@elastic/elasticsearch': { Client }
})
const instance = elastic(Object.assign(options, { 'es-version': 7 }))
const instance = elastic(Object.assign(options, { esVersion: 7 }))
const log = pino(instance)
const prettyLog = `some logs goes here.
another log...`
Expand Down Expand Up @@ -280,7 +280,7 @@ test('make sure `flushInterval` is passed to bulk request', (t) => {
log.info(['info'], 'abc')
})

test('make sure deprecated `flush-interval` is passed to bulk request', (t) => {
test('make sure deprecated `flushInterval` is passed to bulk request', (t) => {
t.plan(1)

const flushInterval = 12345
Expand All @@ -297,7 +297,7 @@ test('make sure deprecated `flush-interval` is passed to bulk request', (t) => {
'@elastic/elasticsearch': { Client }
})

const instance = elastic({ ...options, 'flush-interval': flushInterval })
const instance = elastic({ ...options, flushInterval })
const log = pino(instance)
log.info(['info'], 'abc')
})
Expand Down

0 comments on commit c1898b1

Please sign in to comment.