Bob Rudis 3 years ago
parent
commit
9abcd8b398
3 changed files with 17 additions and 10 deletions
  1. 1
    0
      README.Rmd
  2. 10
    9
      README.md
  3. 6
    1
      tests/testthat/test-gdns.R

+ 1
- 0
README.Rmd View File

@@ -62,6 +62,7 @@ date()
62 62
 test_dir("tests/")
63 63
 
64 64
 hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com")
65
+
65 66
 gdns::bulk_query(hosts)
66 67
 ```
67 68
 

+ 10
- 9
README.md View File

@@ -39,25 +39,26 @@ library(gdns)
39 39
 library(testthat)
40 40
 
41 41
 date()
42
-#> [1] "Sat Apr  9 17:28:00 2016"
42
+#> [1] "Sat Apr  9 20:19:06 2016"
43 43
 
44 44
 test_dir("tests/")
45 45
 #> testthat results ========================================================================================================
46
-#> OK: 0 SKIPPED: 0 FAILED: 0
46
+#> OK: 2 SKIPPED: 0 FAILED: 0
47 47
 
48 48
 hosts <- c("rud.is", "dds.ec", "r-project.org", "rstudio.com", "apple.com")
49
+
49 50
 gdns::bulk_query(hosts)
50 51
 #> Source: local data frame [7 x 4]
51 52
 #> 
52 53
 #>             name  type   TTL            data
53 54
 #>            (chr) (int) (int)           (chr)
54
-#> 1        rud.is.     1  2345 104.236.112.222
55
-#> 2        dds.ec.     1   299   162.243.111.4
56
-#> 3 r-project.org.     1   220   137.208.57.37
57
-#> 4   rstudio.com.     1  3392    45.79.156.36
58
-#> 5     apple.com.     1  2656   17.142.160.59
59
-#> 6     apple.com.     1  2656   17.172.224.47
60
-#> 7     apple.com.     1  2656    17.178.96.59
55
+#> 1        rud.is.     1  3599 104.236.112.222
56
+#> 2        dds.ec.     1   284   162.243.111.4
57
+#> 3 r-project.org.     1  7146   137.208.57.37
58
+#> 4   rstudio.com.     1  3599    45.79.156.36
59
+#> 5     apple.com.     1  3172   17.172.224.47
60
+#> 6     apple.com.     1  3172    17.178.96.59
61
+#> 7     apple.com.     1  3172   17.142.160.59
61 62
 ```
62 63
 
63 64
 ### Code of Conduct

+ 6
- 1
tests/testthat/test-gdns.R View File

@@ -1,6 +1,11 @@
1 1
 context("basic functionality")
2 2
 test_that("we can do something", {
3 3
 
4
-  #expect_that(some_function(), is_a("data.frame"))
4
+  expect_that(length(gdns::query("example.com")), equals(8))
5
+
6
+  doms <- c("example.com", "example.org", "example.net")
7
+  qry <- gdns::bulk_query(doms)
8
+
9
+  expect_that(dim(qry), equals(c(3, 4)))
5 10
 
6 11
 })

Loading…
Cancel
Save