Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #7 from dappnode/v0.1.2
Browse files Browse the repository at this point in the history
v0.1.2
  • Loading branch information
eduadiez committed Aug 18, 2018
2 parents b5ac868 + a3c2b48 commit 3171831
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ WORKDIR /usr/src/app

RUN apk add --no-cache libstdc++ && \
ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
ALPINE_GLIBC_PACKAGE_VERSION="2.27-r0" && \
ALPINE_GLIBC_PACKAGE_VERSION="2.28-r0" && \
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
wget \
"https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub" \
"https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \
-O "/etc/apk/keys/sgerrand.rsa.pub" && \
wget \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
Expand Down
67 changes: 56 additions & 11 deletions build/src/ens.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions build/src/ens.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
var assert = require('assert');

var ens = require('./ens')

describe('ens', function() {
describe('ens.getContent', function() {
it('should return the IPFS hash of decentral.eth', async function() {
const content = await ens.getContent('decentral.eth');
assert.equal(content, '/ipfs/QmXufxJH2a14QcWdvaHq3PMmFLK8xmCXoD68NVaxchSEVi');
});

it('should return the IPFS hash of my.admin.dnp.dappnode.eth', async function() {
const content = await ens.getContent('my.admin.dnp.dappnode.eth');
assert.equal(content, '0x404');
});

it('should return the IPFS hash of mycrypto.dappnode.eth', async function() {
const content = await ens.getContent('mycrypto.dappnode.eth');
assert.equal(content, '/ipfs/Qmdojo8KAsZu7XTkETYwSiZMCjdUa58YNZCUKmsZ21i8gV');
});

it('should return the IPFS hash of portalnetwork.eth', async function() {
const content = await ens.getContent('portalnetwork.eth');
assert.equal(content, '/ipfs/QmSpuwejUGjREmgsvm8eq3ZdsS7mVTHCRPZmLiUq84S9x8');
});
});
});
Loading

0 comments on commit 3171831

Please sign in to comment.