Skip to content

Commit db8771a

Browse files
committed
chore: remove the mongodb version
1 parent 2018323 commit db8771a

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

test/specification_tests/crud_test.exs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@ defmodule Mongo.SpecificationTests.CRUDTest do
33
import Mongo.Specification.CRUD.Helpers
44
require Mongo.Specification.CRUD
55

6-
def min_server_version?(nil), do: true
7-
8-
def min_server_version?(number) do
9-
min_server_version =
10-
(number <> ".0")
11-
|> String.split(".")
12-
|> Enum.map(&elem(Integer.parse(&1), 0))
13-
|> List.to_tuple()
14-
15-
mongo_version() >= min_server_version
16-
end
6+
def min_server_version?(_all), do: true
177

188
setup_all do
199
{:ok, pid} = Mongo.start_link(database: "mongodb_test")

test/support/specification_case.ex

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,4 @@ defmodule Mongo.SpecificationCase do
1111
import Mongo.SpecificationCase
1212
end
1313
end
14-
15-
def mongo_version do
16-
{string, 0} = System.cmd("mongod", ~w'--version')
17-
["db version v" <> version, _] = String.split(string, "\n", parts: 2)
18-
19-
version
20-
|> String.split(".")
21-
|> Enum.map(&elem(Integer.parse(&1), 0))
22-
|> List.to_tuple()
23-
end
2414
end

0 commit comments

Comments
 (0)