-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from grafana/update-k6deps-to-v0.1.6
Update k6deps to v0.1.6
- Loading branch information
Showing
6 changed files
with
46 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
"use k6 = 0.52"; | ||
"use k6 with k6/x/faker >= 0.3.0"; | ||
"use k6 with k6/x/sql >= 0.4.0"; | ||
"use k6 with k6/x/sql >= 1.0.0"; | ||
|
||
import faker from "./faker.js"; | ||
import sqlite from "./sqlite.js"; | ||
import sql from "./sql.js"; | ||
|
||
export { setup, teardown } from "./sqlite.js"; | ||
export { setup, teardown } from "./sql.js"; | ||
|
||
export default () => { | ||
faker(); | ||
sqlite(); | ||
sql(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// source: https://github.com/grafana/xk6-sql/blob/v0.4.0/examples/sqlite3_test.js | ||
import sql from "k6/x/sql"; | ||
import driver from "k6/x/sql/driver/ramsql"; | ||
|
||
const db = sql.open(driver); | ||
|
||
export function setup() { | ||
db.exec(`CREATE TABLE IF NOT EXISTS namevalues ( | ||
id integer PRIMARY KEY AUTOINCREMENT, | ||
name varchar NOT NULL, | ||
value varchar);`); | ||
} | ||
|
||
export function teardown() { | ||
db.close(); | ||
} | ||
|
||
export default function () { | ||
db.exec("INSERT INTO namevalues (name, value) VALUES('plugin-name', 'k6-plugin-sql');"); | ||
|
||
let results = db.query("SELECT * FROM namevalues WHERE name = $1;", "plugin-name"); | ||
for (const row of results) { | ||
console.log(`name: ${row.name}, value: ${row.value}`); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
k6exec `v0.1.9` is here 🎉! | ||
|
||
This release includes: | ||
|
||
- Update k6deps to v0.1.6: Support import path of arbitrary depth (deeper than three levels) (eg `k6/x/foo/bar`). Drivers of the `xk6-sql` extension use 5-level deep imports (eg `k6/x/sql/driver/ramsql`) |